-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAcisworking.java
More file actions
54 lines (38 loc) · 1.18 KB
/
Acisworking.java
File metadata and controls
54 lines (38 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
public class Acisworking{
private static boolean isOn = true;
private static boolean isOff = true;
private int temperatureIncrease = 16;
private int temperatureDecrease = 30;
public static boolean acIsTurnedOn(){
if (isOn == true){
System.out.println("Ac is turned on");
} else{
System.out.println("Ac is turned off");
}
return isOn;
}
public static boolean acIsTurnedOff(){
if (isOff == true){
System.out.println("Ac is switched off");
}
return isOff;
}
public int acTemperatureIncreased(){
if (temperatureIncrease < 30){
temperatureIncrease++;
}
return temperatureIncrease;
}
public int acTemperatureDecreased(){
if (temperatureDecrease > 16){
temperatureDecrease--;
}
return temperatureDecrease;
}
public int acTemperatureIncreasedby30(){
if (temperatureIsIncreased < 30){
temperatureIncrease++;
}
return temperatureIncrease;
}
}