Hotel Plaza Exercise
(using classes and objects)
You are to make an application for a hotel.
The program must contain the following classes.
HotelExercise , with your main.
Room : roomID, number of beds, internet acces, price pr. night, floor
Guests : GuestID, firstName, lastName, address, telephone number
Staff : title, firstName, lastName, telephone number, salary
Booking : startDate, endDate, number of days, roomID, GuestID
Add associations between the classes
Make the fields in class 'Room', 'Guest' and 'Staff' private and add getters and setters.
If necessary, change the methods you have made in your classes, to handle the encapsulation.
Add code to your classes so that you will have the following functionality:
- --you should be able to change the price of a room
- --you should be able to change all the fields in a guest object
- --you should be able to change the last name, title, phone number and salary in a staff object
- --you should be able to extend a booking by days.
In your main
Make a menu where you can choose to create rooms, guests, staff members and bookings.
Use a Switch so that you return to the menu, every time you have created an object.
You should be able to end the program in the menu.
Make files and save rooms, guests, staff and bookings so that they are available when you run the program next time.
Create at least 6 rooms (2 one bed, 2 double beds, 2 suites)
Create staff (at least: one director, one receptionist, one cleaning lady, one accountant), with the appropriate field values
Create at least 8 guests for the rooms
Make bookings for the rooms so that you can print the bill (on console, formatted nicely!)
Tips:
- --Create one class at a time
- --Test it by creating an object
- --Make a toString method in the classes so that the object can print itself
- --Test the functionality methods on the objects
- --Make the menu (Switch) and out comment all choices except the one you are working on
- --Make the choices/methods one at a time
- --TEST ALL THE TIME!!!!!!!!!!!!!