Create two objects of each room type

Assignment Help JAVA Programming
Reference no: EM133156387

Background

The system that you will create is a Hotel Management System (HMS). The HMS is a tool used by a hotel that manages rooms, amenities and their bookings by customer. The hotel has different types of rooms to cater the needs of different customers and has various amenities to choose from.

Each room has a unique ID, features, price and location in the hotel. For each hotel room, there are a number of available amenities for ordering by guests. (For example: - Room no 1 has one queen bed, $200 price and at extreme left corner of ground floor and have included amenities like wifi, TV with Netflix, Laundry, Breakfast, Lunch, Dinner, Coffee machine, AC, Heater etc. Following are the number of amenities available in hotel rooms:

1. Free WIFI
2. TV with Netflix
3. Laundry containing washer and dryer
4. Air Conditioner
5. Heater
6. Coffee machine
7. Breakfast
8. Lunch
9. Dinner
10. Undercover barbeque area
11. Electric Blankets
12. Toasters
13. Microwave

This IT system, HMS, will enable the manager to customise and save different types of rooms to the system as well as view the stored list of rooms. It will be possible to inspect details for each room. The details will include specifics of the rooms as well as specific details regarding amenities that can be added to rooms. Each amenity will have an ID, name, description and basic price associated with it.
There are following room types in the hotel that you have to incorporate in your system:

1. A deluxe queen room is suitable for couples, has queen bed in it, number of amenities and 8% discount is available on its original price.

2. A deluxe spa is suitable for travellers or any needing relaxation, has one self-contained spa, one queen bed, number of amenities and surcharge of $80 is added on its original price for spa facility.

3. A family suite is suitable for family, has one queen bed and two single beds, a number of amenities and 20% discount is available on its original price.

4. Two bedroom family suite is suitable for big family, has two self-contained two bedrooms with queen beds, attached bathrooms, number of amenities and 5% discount is available on its original price.
Customer can book more than one room at a time and can add various amenities into their rooms according to their requirements. The HMS will give discount to customers according to their status. When customer book rooms, system will ask the status of customer and discounts will be given according to following information.
1. Active customers are the one who visits hotel at least once a week and will get 8% discount on every order they made.
2. VIP customers are the one who have been visiting hotel from more than one year and will get 12% discount on all orders.
3. New Customers will not get any discounts.
Once a room is booked, HMS will calculate the total of order and will issue invoice to customer.

Requirement 2: Coding

2.1 Create Room class which will have basic attributes as given in background information.
a) A default constructor which assigns each instance variable a default value.
b) A constructor with parameters which assign values to each instance variable. Note that the values to initialise in the objects should be passed in using arguments when the constructor is called.
c) Author get and set methods for your classes for instance variables where appropriate.
d) This class has array of amenities, so you need to add proper methods to add the items into the array, remove the items and retrieve the item from the array.
e) Room class should have calculatePrice() which will add the price of all amenities and its own price in it.
f) You need to write proper toString() method to display the details of room and amenities in it.

2.2 Create sub-classes of room class as given in background information.
You must provide the following in each particular specialised room class.
a. All the room classes have (at least) the following attributes: RoomiD (int), features (String), Description (String), Price(double) which will be inherited from super class and one additional attribute of your own choice.
b. A default constructor which assigns each instance variable a default value. The String variables (e.g. features) should be initialised to "unknown", the price should be initialised to a minimum default price and any object fields initialised to null.

c. A constructor with parameters which assign values to each instance variable. Note that the values to initialise in objects should be passed in using arguments when the constructor is called.
d. Author get and set methods for your classes for instance variables where appropriate.
e. Write a toString() method in each class that will return a String containing all the relevant data for each of your objects.
f. In each of your specialised room classes, override the setPrice() method to perform an appropriate price calculation based on the amenities in the object.

2.3 Create a class for amenities which will have attributes ID (int), name (String), Description (String), price (double). These amenities will be stored in each room in form of array or arrayList.
a. A default constructor which assigns an instance variable a default value.
b. A constructor with parameters which assign values to each instance variable.
c. Write get and set methods for your classes for instance variables where appropriate.
d. Write a toString() method in this class that will return a String containing all the relevant data for each of your objects

2.4 Create a customer class which will have name (String), discount (double) and status (String) as its attributes.
a. A default constructor which assigns an instance variable a default value. Note: You do not want customer to do any manipulations with the discount value. It will be calculated according to the status.
b. A constructor with parameters which assign values to each instance variable.
c. Write get and set methods for your classes for instance variables where appropriate.
d. Write a toString() method in each class that will return a String containing all the relevant data for each of your objects
e. setDiscount() method will calculate and set the discount according to status of customer.

2.5 In HotelDriver class, create a main method and do as follows:
a) Create two objects of each room type.
b) Create all amenities as given in background information. You can create more of your choice.
c) Display a welcome message which should have following information in it:
i. The welcome message should have a row of "*" at the top and the bottom, just long enough to extend over the text. Hint: Use a loop for this.
ii. The first line of the message should read "WELCOME TO HOTEL MANAGEMENT SYSTEM"
iii. The second line of the message should be blank.
iv. The third line should read "Developed by" followed by your names and a comma, then "student ID", then your student ids of all group members.

v. The fourth line should display "OODP101 Object Oriented Design and Programming Assessment Task 4"
vi. The fifth line should display the current date and time of system.
vii. The sixth line should be blank, and the seventh line should be another row of "*"
d) Ask user if they want to place order. If yes, ask the name and status of customer and save it because you will need it for calculating the final price and printing the final output.
e) Display all created room types and ask user to enter the room they want to book using room ID.
f) Once room is selected, display the list of amenities to user that they can add in their booking. Ask user to select amenities with the help of ID and user can add more than one amenity in one room.
g) Populate each room with all selected amenities. Your room class is having array or arrayList of objects and methods to add these amenities in the rooms. Use those methods here to add amenities in the room.
h) Ask user if they want to book another room, repeat the steps from a) to e).
i) When user wish to finish order, program should calculate the total of all room price, amenities price and deducting customer discount according to the status they entered.
j) Display the total amount due with all the details of order.

2.6 Document all methods in your code using comments and by following proper coding standards.

Reference no: EM133156387

Questions Cloud

Areas of the report that need improvement : Clarify the students understanding of the Part A task. Each student will be asked to assess an Assessment 3 - Part A produced by of one of their peers
Identify the strengths of the report : Identify the strengths of the report - Build your career in a highly engaged and successful team
Determine the total current assets at December : The only liabilities not listed are $37,000 notes payable due in two years. Determine the total current assets at December 31, 2021
Calculate the value of the bond : You own a bond with a par value of $1000 that pays a $100 annual coupon. The bond matures in 15 years. Calculate the value of the bond
Create two objects of each room type : Create is a Hotel Management System (HMS). The HMS is a tool used by a hotel that manages rooms, amenities and their bookings by customer
What is non-controlling interest share of Camia net income : Rosas Corporation acquired a 70% interest in Camia Co. for 2015. What is the non-controlling interest share of Camia's net income for 2015
What is the exchange rate on December : B Company acquired a computer for 100,000 USD when the exchange rate is 1 peso into 20 USD. What is the exchange rate on December
Prepare annual adjusting entry for depreciation at December : Depreciation for the year is estimated to be $3,600. Prepare the annual adjusting entry for depreciation at December 31
Find news of a recent merger using an online search : Find news of a recent merger using an online search or a business periodical such as Bloomberg Businessweek, Fortune, or The Wall Street Journal. Research the m

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd