Question: Write this program in C. A small airline has just purchased a computer for its new automated reservations system. The CTO has asked you to

Write this program in C.

A small airline has just purchased a computer for its new automated reservations system. The CTO has asked you to program the new system. Youll write a program to assign seats on each flight of the airlines only plane (capacity: 72 seats, in 12 rows). For the sake of simplicity, assume that each row has 6 seats labeled A, B, C, D, E, F. Rows A and F and window seats.

Your program should display the following menu of alternatives: Please type F for "first class" Please type B for "business class" Please type E for economy class If the person types F, then your program should assign a seat in the first class section (rows 1-2). If the person types B, then your program should assign a seat in the business class section (rows 3-5). If the person types E, then your program should assign a seat in the economy section (rows 612). Seat Assignment is done using random numbers (i.e., Use a random number generator to select the seat and then check if that seat is un-assigned). Confirm with the user if he/she wants a Window seat or Aisle. If user doesnt want the selected seat, repeat the random seat assignment process again (dont repeat this more than 3 times for one user).

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!