001package headfirst.command.remote;
002
003public class Hottub {
004        boolean on;
005        int temperature;
006
007        public Hottub() {
008        }
009
010        public void on() {
011                on = true;
012        }
013
014        public void off() {
015                on = false;
016        }
017
018        public void bubblesOn() {
019                if (on) {
020                        System.out.println("Hottub is bubbling!");
021                }
022        }
023
024        public void bubblesOff() {
025                if (on) {
026                        System.out.println("Hottub is not bubbling");
027                }
028        }
029
030        public void jetsOn() {
031                if (on) {
032                        System.out.println("Hottub jets are on");
033                }
034        }
035
036        public void jetsOff() {
037                if (on) {
038                        System.out.println("Hottub jets are off");
039                }
040        }
041
042        public void setTemperature(int temperature) {
043                this.temperature = temperature;
044        }
045
046        public void heat() {
047                temperature = 105;
048                System.out.println("Hottub is heating to a steaming 105 degrees");
049        }
050
051        public void cool() {
052                temperature = 98;
053                System.out.println("Hottub is cooling to 98 degrees");
054        }
055
056}