Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use Python to create the program below: Hotel Tropicana Room Reservation Write a program that allows users to reserve conference rooms in a luxurious 5

Use Python to create the program below:
Hotel Tropicana Room Reservation
Write a program that allows users to reserve conference rooms in a luxurious 5 star hotel where guests and staff will be requesting to reserve specific rooms and provide a number of guests.
The requests will be processed and a decision is made based on both the availability of rooms as well as whether these
rooms will allow for the number of guests attending.
To improve upon the efficiency and reliability of this process, a state of the art system is being developed to input a request for a room.
A request for a room will include a location and the number of guests.
A look up is done to find the location given and check its availability.
If the room is available, the attendance is compared to the rooms occupancy limit to ensure the room is large enough to accommodate each reservation.
1. Each location will be an instance Room class. Setup and define constructor for Room, as well as the methods for the properties.
For the Room class, you will need an instance method to specify the location, occupancy limit, and whether that location is available.
If the availability is not specified, that property should be automatically set to false.
You will also need three methods to access these three properties. Create a Test class to test your code.
2. Create an array of Room objects to represent a sample of the conference rooms.
Refer to the following code to create this array.
See examples
brilliantbanana = Room("brilliantbanana",120, True)
creamycoconut = Room("creamycoconut",120)
opulentorange = Room("opulentorange",80, True)
plushpineapple = Room("plushpineapple",200)
rooms =[brilliantbanana, creamycoconut, opulentorange, plushpineapple]
3. Ask the user to input each room location and attendees
You then need to ask the user to input a location. You will use a loop to access the room with a location that matches the location entered by the user.
To simplify the logic of this part, assume that the user always enters a location listed in the array.
If the room is not available, you will indicate this to the user and terminate the program.
If the room is available, you then need to ask the user to input the expected attendance.
If the expected attendance is greater than the occupancy limit, you will indicate this to the user and terminate the program.
Otherwise, you will indicate that the room can accommodate their attendance and terminate the program.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

7. Explain how to recruit a more diverse workforce.

Answered: 1 week ago

Question

1. Identify three approaches to culture.

Answered: 1 week ago

Question

2. Define communication.

Answered: 1 week ago