-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRoom.java
More file actions
60 lines (47 loc) · 1.27 KB
/
Copy pathRoom.java
File metadata and controls
60 lines (47 loc) · 1.27 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
53
54
55
56
57
58
59
60
package pgrentalsystem;
public class Room {
private int roomNumber;
private double rent;
private boolean isOccupied;
private String roomType;
public Room(int roomNumber, double rent,String roomType) {
this.roomNumber = roomNumber;
this.rent = rent;
this.isOccupied = false;
this.roomType=roomType;
}
// Getters and Setters
public int getRoomNumber() {
return roomNumber;
}
public String getRoomType() {
return roomType;
}
public void setRoomType(String roomType) {
this.roomType = roomType;
}
public void setRoomNumber(int roomNumber) {
this.roomNumber = roomNumber;
}
public double getRent() {
return rent;
}
public void setRent(double rent) {
this.rent = rent;
}
public boolean isOccupied() {
return isOccupied;
}
public void setOccupied(boolean occupied) {
isOccupied = occupied;
}
@Override
public String toString() {
return "Room{" +
"roomNumber=" + roomNumber +
", rent=" + rent +
", isOccupied=" + isOccupied +
", roomType='" + roomType + '\'' +
'}';
}
}