Untitled

 avatar
unknown
plain_text
4 years ago
982 B
4
Indexable
public class WaterHeater{

    private int length;
    private int width;
    private int capacity;
    private boolean temperature;

    public WaterHeater (int length, int width, int capacity)  {
        this.length = length;
        this.width=width;
        this.capacity=capacity;
        temperature=false;
    }    
    public int getLength() {
        return length;
    }
    public void setLength(int length) {
        this.length = length;
    }

    public int getWidth() {
        return width;
    }
    public void setWidth(int width) {
        this.width = width;
    }
    
    public int getCapacity() {
        return capacity;
    }
    public void setCapacity(int capacity) {
        this.capacity = capacity;
    }
    public boolean getTemperature() {
        return temperature;
    }
    public void setTemperature(boolean temperature) {
        this.temperature = temperature;
    }
    public void resetWaterHeater() {
        temperature = false;
    }
}
Editor is loading...