Question: Implement a simple hotel reservations system as a proof-of-concept prototype for fictitious project to be used on a larger system. The system you are developing

Implement a simple hotel reservations system as a proof-of-concept prototype for fictitious project to be used on a larger system. The system you are developing must provide a simple text based interface that will allow the user to enter attributes associated with each reservation. The program will manage the attributes for each reservation, which will be an individual node within a single linked list stored in memory. The linked list can be a global variable for simplicity like the Book Inventory example. The program must use the list API in the C++ standard template library (STL). The program must implement at least one class that will hold the following variables (input validation is only required where indicated):

? locaterId string An automatically generated string to identify the locator identification number for the reservation. The string must be in the form LLNNN-LL, where N is a number from 0 to 9, and L is a character from A to Z. For example: MQ406-GF. The locaterId must a unique identifier for each reservation in the linked list and repeats are not allowed. ? checkInDate string The date of that the guest will check in to the hotel. The date must be single string in the form mm/dd/yyyy. Where mm is the two-digit month, dd is the two-digit day, and yyyy is a four-digit year. Input Validation Required: The program must re-prompt the user to re-enter the date if it is not in valid format provided above. ? checkOutDate string The date of that the guest will check out of the hotel. The date must be in the form mm/dd/yyyy. Where mm is the two-digit month, dd is the two-digit day, and yyyy is a four-digit year. Input Validation Required: The program must re-prompt the user to re-enter the date if it is not in valid format provided above. ? numberOfDays int The total number of days that guest will be staying. ? numberOfOccupants int The number of occupants who will be staying in the room. ? rate double The dollar amount charge per day for the room. ? roomType int The value of this field must range from 1 to 6 to associates the room with one of the following valid types: 1=One king size bed, 2=One king size beds, 3=One queen size bed, 4=Two queen size beds, 5=Suite, 6=Special Request Input Validation Required: The program must re-prompt the user if the value of the entered type is not within the valid range. ? firstName string A string variable to hold guests first name. ? lastName - string A string variable to hold guests last name. ? street string A string variable to hold the guests street name and street number. Spaces must be allowed between the street number and street name. ? city string A string variable to hold the name of the guests city. ? state string A string variable to hold the two-character state abbreviation of where the guest resides. Input Validation Required: The program must re-prompt the user if the entered state if it is not two characters. ? zipCode int Holds the zip code for where the guest resides. Input Validation Required: The program must re-prompt the user to re-enter the zip code if it is not a five-digit number. ? emailAddress string The guests e-mail address. Input Validation Required: The program must re-prompt the user for a valid e-mail address if the entered string does not contain an @ character. ? phoneNumber string A string variable to hold the guests contact phone number. Provide the appropriate methods to set and get the data for each of these class variables. For example setFirstName(string firstName) and string getFirstName(). The Book Inventory provides an example on how this can be done. In addition, the main program must provide the following functionality: 1. When the program is first started, it must read a data file called bookings.dat. The program must not prompt the user for the name of the data file. The name of the file must be hard-coded within the program. If the file exists, the program will load the data for each reservation into a global linked list. If the file does not exist, the program will start with an empty linked list. 2. The program will provide a simple text-based user interface that manages the all of the reservations within a linked list. Each reservation must be placed in the linked list as an object that holds all of the attributes associated with it as mentioned above. The user interface will allow the user to perform the following: (a) Enter Reservation allows the user to enter all of the fields for new reservation, except for the locaterId, which will be automatically generated by the program as previously mentioned. After the fields are entered, the program will place the reservation object in the global linked list. (b) Display Reservations displays all of the reservations within the linked list along with their associated properties. When displaying the room type, the program must print the room type number along with the associated description (e.g. One king size bed, Two king size beds, etc.). In addition, this option must print the total charge for each reservation based on the rate and number of days that the guest will be staying. Also, print the total number reservations in the linked list. (c) Find Reservation allows the user to find a reservation by its locaterId. The program will prompt the user to enter the locaterId and will display all of the fields associated with the given reservation if it is found. The program must display an error message if the reservation is not found in the linked list. (d) Modify Reservation allows the user to edit the fields for a given reservation that is in the linked list (except for the locaterId). The program must prompt the user to enter the locaterId as the key to find the reservation to edit. Print a message if the reservation is not found in the linked list. For simplicity, the program may re-prompt the user to re-enter all of the fields associated with the given reservation; however, it must reuse the locaterId value. (e) Cancel Reservation allows the user to delete a reservation from the linked list using the locaterId as the key. The program must display a message if the provided locaterId is not found in the linked list. (f) Exit System before the program exits, it must save all of the reservations in the linked list to the data file. I recommend using a standard text file with one field in the object per line. At this point, if the file does not exist, the program will create it.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!