-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathHouse.java
More file actions
48 lines (36 loc) · 1009 Bytes
/
Copy pathHouse.java
File metadata and controls
48 lines (36 loc) · 1009 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
46
47
48
public class House {
private int numStories;
private int numWindows;
private String color;
//no-arg constructor
public House() {
numStories = 1;
numWindows = 4;
color = "gray";
}//end ctor
//parameterized ctor
public House(int numStories, int numWindows, String color) {
this.numStories = numStories;
this.numWindows = numWindows;
this.color = color;
}//end param ctor
public int getNumStories() {
return numStories;
}
public void setNumStories(int numStories) {
this.numStories = numStories;
numStories = numStories;
}
public int getNumWindows() {
return numWindows;
}
public void setNumWindows(int numWindows) {
this.numWindows = numWindows;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
}//end House