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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started