Skip to content

Built a booking system for the new CodeClan Towers hotel(Lab).

Notifications You must be signed in to change notification settings

rock-007/hotel_lab_java_tdd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeClan Towers

You are being asked to build a booking system for the new CodeClan Towers hotel.

Use TDD in Junit to model the Hotel with Java classes, with separate test files for each class.

MVP

  • Create a Guest class to represent a visitor to the hotel, they'll at least need a name, you can add more properties later if and when they become necessary
  • Create a RoomType enum of bedroom types (e.g. Single/Double) and capacity
  • Create a Room abstract class with a capacity and collection of Guests
  • Create 2 different types of rooms that inherit from Room:
    • Bedrooms will additionally have a room number and RoomType
    • ConferenceRooms will additionally have a name and any other properties you wish.
  • Create a Hotel class, which has a collection of Bedrooms and a collection of ConferenceRooms.
  • The Hotel will be able check guests in/out of rooms.

Extensions

  • Create a Booking class which contains a Bedroom and a number of nights booked.
  • Create a bookRoom method in your Hotel. This should book a given Bedroom for a number of nights. This should return a new Booking object.
  • Add a nightly rate to your Bedrooms and write a method to return the total bill for the Booking.
  • Add a DiningRoom class with a name, capacity, and collection of guests
  • Hotel will have a HashMap based collection of DiningRooms.
  • Hint ^ HashMap<String, DiningRoom>

    The String here could be from calling .getName() on the instance of DiningRoom

Advanced Extensions

  • Add functionality to the Hotel so it can return a collection of only the vacant Bedrooms.
  • Update the check-in process so that Hotel will only be able to check guests into empty Bedrooms.
  • Any other extensions you can think of!

About

Built a booking system for the new CodeClan Towers hotel(Lab).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages