-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHotel.java
145 lines (120 loc) · 3.47 KB
/
Hotel.java
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
import java.util.ArrayList;
import java.util.UUID;
public class Hotel {
private UUID uuid;
private HotelName name;
private int rating;
private boolean petFriendly;
private boolean hasBreakfast;
private boolean hasPool;
private String location;
private int numFloors;
private int numRoomsPerFloor;
private ArrayList<ArrayList<Room>> rooms;
public Hotel(){
this.uuid = UUID.randomUUID();
this.setName(HotelName.DEFAULT_NAME);
this.setRating(0);
this.setPetFriendly(false);
this.setHasBreakfast(false);
this.setHasPool(false);
this.setLocation("");
this.setNumFloors(0);
this.setNumRoomsPerFloor(0);
this.setRooms(new ArrayList<ArrayList<Room>>());
} // ending bracket of default constructor for Hotel
public Hotel(UUID uuid, HotelName name, int rating, boolean petFriendly, boolean hasBreakfast, boolean hasPool,
String location, int numFloors, int numRoomsPerFloor, ArrayList<ArrayList<Room>> rooms) {
this.uuid = uuid;
this.name = name;
this.rating = rating;
this.petFriendly = petFriendly;
this.hasBreakfast = hasBreakfast;
this.hasPool = hasPool;
this.location = location;
this.numFloors = numFloors;
this.numRoomsPerFloor = numRoomsPerFloor;
this.rooms = rooms;
}
/**
* Getters and Setters
* @return
*/
public UUID getUUID() {
return uuid;
}
public void setUUID(UUID uuid) {
this.uuid = uuid;
}
public HotelName getName()
{
return name;
}
public void setName(HotelName name)
{
this.name = name;
}
public int getRating()
{
return rating;
}
public void setRating(int rating)
{
this.rating = rating;
}
public boolean isPetFriendly()
{
return petFriendly;
}
public void setPetFriendly(boolean petFriendly)
{
this.petFriendly = petFriendly;
}
public boolean getHasBreakfast()
{
return hasBreakfast;
}
public void setHasBreakfast(boolean hasBreakfast)
{
this.hasBreakfast = hasBreakfast;
}
public boolean getHasPool() {
return hasPool;
}
public void setHasPool(boolean hasPool) {
this.hasPool = hasPool;
}
public String getLocation()
{
return location;
}
public void setLocation(String location)
{
this.location = location;
}
public int getNumFloors() {
return numFloors;
}
public void setNumFloors(int numFloors) {
this.numFloors = numFloors;
}
public int getNumRoomsPerFloor() {
return numRoomsPerFloor;
}
public void setNumRoomsPerFloor(int numRoomsPerFloor) {
this.numRoomsPerFloor = numRoomsPerFloor;
}
public ArrayList<ArrayList<Room>> getRooms() {
return rooms;
}
public void setRooms(ArrayList<ArrayList<Room>> rooms) {
this.rooms = rooms;
}
/**
* Converts the hotel informtation to a String
*/
public String toString(){
return "Hotel Name: " + name.getName() + " Location: " + this.getLocation() +" Rating: " + this.getRating() + " Pet Friendly: " + this.isPetFriendly() + " Breakfast: "
+ this.getHasBreakfast() + " Pool: " + this.getHasPool();
}
}