Giter Site home page Giter Site logo

martinloesethjensen / hotelplazaexercise Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 236 KB

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

Java 100.00%
hotel booking room guest staff roomid salary lastname firstname telephone-number

hotelplazaexercise's Introduction

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

hotelplazaexercise's People

Contributors

martinloesethjensen avatar

Watchers

 avatar

Forkers

capttwigg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.