- Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathHouse.java
More file actions
Latest commit
executable file
·25 lines (18 loc) · 470 Bytes
/
Copy pathHouse.java
File metadata and controls
executable file
·25 lines (18 loc) · 470 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
packagetutorialquestions.questionbdb4.flawed;
publicclassHouse {
privateRectanglefloorSize;
privateintfloorArea;
publicHouse(RectanglefloorSize) {
setFloorSize(floorSize);
}
publicRectanglegetFloorSize() {
returnfloorSize;
}
publicvoidsetFloorSize(RectanglefloorSize) {
this.floorSize = floorSize;
floorArea = floorSize.getWidth() * floorSize.getHeight();
}
publicintgetFloorArea() {
returnfloorArea;
}
}