You are on page 1of 1

Customer

FreeRoom
- EMAIL_REGEX_PATTERN: String
+ FreeRoom(roomNumber: String, enumeration: RoomType) - firstName: String
+ toString(): String - lastName: String
1
- email: String
- isValidEmail(email: String): void

+ Customer(firstName: String, lastName: String, email: String)


+ getEmail(): String
+ toString(): String

AdminMenu
Room Reservation
- adminResource: AdminResource
- roomNumber: String - customer: Customer - printMenu(): void
- price: Double - room: IRoom - addRoom(): void
- enumeration: RoomType - checkInDate: Date - enterRoomPrice(scanner: Scanner): double
- checkOutDate: Date - enterRoomType(scanner: Scanner): RoomType
+ Room(roomNumber: String, price: Double, enumeration: RoomType) - addAnotherRoom(): void
+ getRoomNumber(): String + Reservation(customer: Customer, room: IRoom, checkInDate: Date, checkOutDate: Date) - displayAllRooms(): void
+ getRoomPrice(): Double + getRoom(): IRoom - displayAllCustomers(): void
+ getRoomType(): RoomType + getCheckInDate(): Date - editRoom(): void
+ getCheckOutDate(): Date HotelApplication
+ isFree(): boolean - editCustomer(): void
+ toString(): String + toString(): String - deleteRoom(): void + main(String[] args): void
1 - deleteCustomer(): void
- displayAllReservations(): void

+ adminMenu(): void
IRoom
+ getRoomNumber(): String
+ getRoomPrice(): Double
+ getRoomType(): RoomType 1
RoomType + isFree(): boolean
SINGLE("1"), AdminResource 1
DOUBLE("2") - customerService: CustomerService
+ SINGLE(String) MainMenu
- SINGLETON: AdminResource
+ DOUBLE(String) - DEFAULT_DATE_FORMAT: String
+ valueOfLabel(label: String): RoomType - reservationService: ReservationService - hotelResource: HotelResource
1 1
- findAndReserveRoom(): void
HotelResource + getSingleton(): AdminResource
- getInputDate(scanner: Scanner): Date
+ getCustomer(email: String): Customer
- SINGLETON: HotelResource - reserveRoom(scanner: Scanner, checkInDate: Date, checkOutDate: Date, rooms: Collection<IRoom>): void
+ addRoom(rooms: List<IRoom>): void
- customerService:CustomerService - printRooms(rooms: Collection<IRoom>): void
1 + getAllRooms(): Collection<IRoom>
- reservationService:ReservationService - seeMyReservation(): void
+ getAllCustomers(): Collection<Customer>
- printReservations(reservations: Collection<Reservation>): void
+ displayAllReservations(): void
+ getSingleton(): HotelResource - createAccount(): void
+ deleteRoom(roomNumber: String): void
+ getCustomer(email: String): Customer + deleteCustomer(email: String): boolean + printMainMenu(): void
+ createACustomer(email: String, firstName: String, lastName: String): void + updateRoom(updatedRoom: IRoom): void + mainMenu(): void
1
+ getRoom(roomNumber: String): IRoom + getRoom(roomNumber: String): IRoom
+ bookARoom(customerEmail: String, room: IRoom, checkInDate: Date, 1 + updateCustomer(customer: Customer): void
checkOutDate: Date): Reservation
1
+ getCustomersReservations(customerEmail: String): Collection<Reservation>
+ findARoom(checkIn: Date, checkOut: Date): Collection<IRoom>
+ findAlternativeRooms(checkIn: Date, checkOut: Date): Collection<IRoom>
+ addDefaultPlusDays(date: Date): Date
1

Use

CustomerService
ReservationService

+SINGLETON: CustomerService
+SINGLETON: ReservationService +customers: Map<String, Customer>
+RECOMMENDED_ROOMS_DEFAULT_PLUS_DAYS: int -privateConstructor()
+rooms: Map<String, IRoom> +getSingleton(): CustomerService
+reservations: Map<String, Collection<Reservation>> +addCustomer(email: String, firstName: String,
lastName: String): void
-privateConstructor() +getCustomer(customerEmail: String): Customer
+getSingleton(): ReservationService +getAllCustomers(): Collection<Customer>
+addRoom(room: IRoom): void
+getARoom(roomNumber: String): IRoom
+getAllRooms(): Collection<IRoom>
+reserveARoom(customer: Customer, room: IRoom, checkInDate: Date, checkOutDate: Date): Reservation
+findRooms(checkInDate: Date, checkOutDate: Date): Collection<IRoom>
+findAlternativeRooms(checkInDate: Date, checkOutDate: Date): Collection<IRoom>
+addDefaultPlusDays(date: Date): Date
+reservationOverlaps(reservation: Reservation, checkInDate: Date, checkOutDate: Date): boolean
+getCustomersReservation(customer: Customer): Collection<Reservation>
+printAllReservation(): void
+getAllReservations(): Collection<Reservation>
+updateRoom(updatedRoom: IRoom): void
+deleteRoom(roomNumber: String): void

You might also like