We appreciate your visit to A new fancy hotel has requested your help to build a system to manage guests reservations The hotel has 6 categories of rooms Additionally the. This page offers clear insights and highlights the essential aspects of the topic. Our goal is to provide a helpful and engaging learning experience. Explore the content and find the answers you need!
Answer :
The task at hand is to build a system that manages guest reservations for a new fancy hotel. The system should handle both making new reservations and checking out guests. The program needs to ask guests if they want to make a new reservation or check out of their current room.
For new reservations, the program should ask for the details of the reservation and check the availability of rooms.
To start with, you will be provided with a text file called "room_details.txt" which contains the details for the rooms offered by the hotel. Each line in the file represents a room category and is formatted as follows: "Category name", number of rooms, capacity, price per night, price per 7 nights, price per 30 nights, and number of rooms occupied.
The first function you need to create is called "LoadDetails". This function reads each line from the text file and stores the details in a multidimensional list so that the data can be used by the system. Each detail in the line is separated by a comma.
Next, you need to handle each guest request using a loop. Since there is no way to know the exact number of guests, the loop should continue until the user enters the letter 'q' to stop asking for more details.
For checking room availability, you need to create a function called "CheckAvailability". This function takes three input parameters: roomData (the details of the rooms), category (the desired room category), and numberOfGuests (the number of guests). The function uses the provided data to check the category and capacity of each room and returns True if a room is available or False if not. It also returns the index location of the available room.
Next, you need to create a function called "CalculatePrice". This function calculates the price of the guest's reservation. It takes three input parameters: roomData, durationOfStay, and roomIndex. The function uses the roomData to determine the rate based on the room category and size, and the duration of the stay. It then returns the calculated price.
To generate a summary of the availability of the rooms, you need to create a function called "CreateSummary". This function accepts the roomData as an input parameter and displays the following information for each type of room: category name and number of rooms occupied.
Lastly, you need to create a function called "UpdateTextFile" to save all the updated information back into the "room_details.txt" file. This function replaces the old information with the new data, so that it will be loaded correctly when the program runs again.
It's important to implement the system as specified, using the exact function names and following the given instructions. The program should also validate the input to ensure the correct information is entered by the user.
By following these steps and using loops, lists, functions, and files, you will be able to build a system to manage the reservations for the new fancy hotel.
To know more about returns, refer here
https://brainly.com/question/1789817
#SPJ11
Thanks for taking the time to read A new fancy hotel has requested your help to build a system to manage guests reservations The hotel has 6 categories of rooms Additionally the. We hope the insights shared have been valuable and enhanced your understanding of the topic. Don�t hesitate to browse our website for more informative and engaging content!
- Why do Businesses Exist Why does Starbucks Exist What Service does Starbucks Provide Really what is their product.
- The pattern of numbers below is an arithmetic sequence tex 14 24 34 44 54 ldots tex Which statement describes the recursive function used to..
- Morgan felt the need to streamline Edison Electric What changes did Morgan make.
Rewritten by : Barada