Question: In C++ You are to code a reservation application for Taggart Transcontinental Train Corp. which allows the user to handle seat reservations for one train

In C++

You are to code a reservation application for Taggart Transcontinental Train Corp. which allows the user to handle seat reservations for one train trip. Seats on the train are numbered from 0 - 19.

Your program is to store seat information in an array. Each array element stores a value (eg. 0/1) indicating if that seat is reserved or vacant. For example, if the array is named seats, then seats[4] can be examined to see if that seat is available. Seats are numbered from front to back of the train, that is, seat 0 is at the front, seat 19 is at the back. The size of the array (20) should be stored in a const variable, so that the program can easily be updated for a larger train.

Your program will:

* first allow the user to initialize all seats to empty

* the user may then perform any of the following options until he/she opts to exit

* reserve a particular seat, if available

* reserve a seat furthest to the front

* reserve a seat furthest to the rear

* cancel a particular seat reservation

* print out the status of all seats on the train

* check if train is full

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!