-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfan.java
More file actions
45 lines (40 loc) · 715 Bytes
/
Copy pathfan.java
File metadata and controls
45 lines (40 loc) · 715 Bytes
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
package SatuApril;
public class fan {
int speed;
boolean on;
double radius;
String color;
fan(){
final int SLOW = 1;
final int MEDIUM = 2;
final int FAST = 3;
speed = SLOW ;
on = false;
radius = 5;
color = "blue";
}
public int getspeed() {
return speed;
}
public boolean geton() {
return on;
}
public double getradius() {
return radius;
}
public String getcolor() {
return color;
}
public void setspeed(int speed) {
this.speed = speed;
}
public void seton(boolean on) {
this.on = on;
}
public void setradius(double radius) {
this.radius = radius;
}
public void setcolor(String color) {
this.color = color;
}
}