Design and develop a programming solution

Assignment Help JAVA Programming
Reference no: EM132923354

OODP101 Object Oriented Design and Programming - Kent Institute

Assessment - Solution to programming problem by group of 3-4 students

Learning Outcome 1: Demonstrate basic knowledge of object-oriented programming concepts and programming problems
Learning Outcome 2: Analyse and dissect simple design and programming problem
Learning Outcome 3: Implement a well-designed modularized solution to small programming problems
Learning Outcome 4: Develop and/or implement testing schedules

ASSESSMENT DESCRIPTION:
Your task will be to design and develop a programming solution to a problem using JAVA programming language.

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 10% discount is available on its original price.
2. A deluxe 2 queen is suitable for family, has two queen beds in it, number of amenities and 5% discount is available on its original price.
3. 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 $50 is added on its original price for spa facility.
4. A family suite is suitable for family, has one queen bed and two single beds, a number of amenities and 15% discount is available on its original price.
5. 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 5% 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 10% discount on all orders.
3. New Customers will not get any discounts.

Requirement 1: Class Diagram
This section expects you to create a class diagram after reading the coding requirements. Your class diagram should have proper relationships between classes, all possible attributes, constructors and methods that your class files will have. You need to use correct notation which is discussed in class.

Requirement 2: Coding
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) You need to write proper toString() method to display the details of room and amenities in it.

 

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.

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

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

Attachment:- Oriented Design and Programming.rar

Reference no: EM132923354

Questions Cloud

Determine the earnings : Assuming that Agro will have earnings before interest and taxes of $400,000 and that Agro is subject to an effective tax rate of 40%, determine the earnings
What are possible reasons for the woman pain : What are possible reasons for this woman's pain? List possible differential diagnosis and explain each? What diagnostic tests should order to confirm diagnosis?
Marketing versus value approach : Compare and contrast a four P's approach to marketing versus the value approach (creating, communicating, and delivering value).
What is the definition of bacteriuria : What is the definition of bacteriuria? What additional history do you need to make a diagnosis? What diagnostic studies would you order and why?
Design and develop a programming solution : Demonstrate basic knowledge of object-oriented programming concepts and programming problems and Implement a well-designed modularized solution to small program
Brief description of clinical issue of interest : Brief description of your clinical issue of interest. This clinical issue will remain the same for the entire course and will be the basis for the development
Customer relationship management : The idea of creating loyal customers is called Customer Relationship Management.
Describe a leader whom have seen use such behaviors : Describe a leader whom you have seen use such behaviors and skills, or a situation where you have seen these behaviors and skills used in practice.
Control work processes and monitor performance : As a manager, you will have to control work processes and monitor performance.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a program which reads a file of genealogy information

Write a program which reads a file of genealogy information and then allows the user to enter pairs of names X and Y.

  Create a class named employee and its subclasses

Create a class named Employee and its 3 subclasses named Contractor, HourlyEmployee, FullTimeEmployee. The class Employee hold first name and last name information, and defines two methods, respectively computing pay and vacation hours, that needs..

  Gui controls memory calculator

create an instance of MemoryCalc in the CalcGUI and write event Handlers to pass information back and forth between the calculator and the GUI

  Implementing a railroad yard simulation program

Implementing a railroad yard simulation program. The user will provide a set of incoming cars, and then a desired outgoing order

  Write a method called alldigitsodds that returns whether

write a method called alldigitsodds that returns whether every digit of a positive integer is odd. return true if the

  Write complete java program to read from keyboard

Write complete Java program to read, from keyboard, a student's first and last name and six grades. It will display on screen last name then first letter of first name with a period.

  Explain getters and setters in java

A constructor will allow a name and a new, validated subject code to be provided when a new subject is created.

  Integers from the user and then displays the sum

Write an application that solicits and inputs three integers from the user and then displays the sum, average, product, smallest, and largest of the three

  Develop a similar class hierarchy for pets.

Java programmers can use class hierarchies for the purposes of inheritance. For example, given a Tree class, we could define Conifer and Deciduous sub classes that inherit from the parent Tree class as you can see here:

  Explain how to declare and manipulate data in arrays

Please respond to all of the following prompts: Explain how to declare and manipulate data in arrays. Explain the meaning of "array index out of bounds".

  Write a java program that simulates a small airport

Write a Java program that simulates a small airport with one runway. Airplanes waiting to take off join a queue on the ground.

  Display an image of an apple on the screen

Display an image of an apple on the screen, then after 3 seconds automatically change the display to an orange.

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