Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

HotelPlazaExercise (Not all functions work and the code still isn't cleaned)

Notifications You must be signed in to change notification settings

martinloesethjensen/HotelPlazaExercise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 

Repository files navigation

HotelPlazaExercise

HotelPlazaExercise

You are to make an application for a hotel, you may assume that you have already made the use cases and the Domain Model.

Make a Design Class Diagram that contains 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 classes in JGrasp (based upon your class diagram)

Make the fields in class Room, Guest and Staff private and ad 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!)

Remember to update your class diagram along the way!!

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!!!!!!!!!!!!!

About

HotelPlazaExercise (Not all functions work and the code still isn't cleaned)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages