Reference no: EM13306134
Write a program that can be used to assign seats for a commcommercial airplane. The airplane has 13 rows, with 6 seats in each row. Rows 1 and 2 are first class, rows 3 to 7 are business class, and rows 8 to 13 are economy class. Your program prompts the user to enter the following information:
a) Ticket type (first class, business class, or economy class)
b) Desired seat
Output the seating plan in the following format:
A B C D E F
Row 1 * * X * X X
Row 2 * X * X * X
Row 3 * * X X * X
Row 4 X * X * X X
Row 5 * X * X * *
Row 6 * X * * * X
Row 7 X * * * X X
Row 8 * X * X X *
Row 9 * * X * X X
Row 10 * X * X X X
Row 11 * * X * X *
Row 12 * * X X * X
Row 13 * * * * X *
Here, * indicates that the seat is available; x indicates that the seat has been assigned. Make this a menu driven program; show the user's choices and allow the user to make the appropriate choices.Beginning with this assignment and including all subsequent assignments ... do not assume that you will recieve "good data" (ie. your program must inspect all input data to ensure that it is valid, and take appropriate action if it is not).
Your program should begin by presenting a menu that has (at a minimum) the following items to choose from: "Assign a Seat"; "Cancel a Reservation"; "Print the Seating Chart"; and "Exit the Program". Once a selection is made, process that selection. You may break down the "Assign a Seat" menu item into three separate choices ... "Assign a First Class Seat"; "Assign a Business Class Seat"; and "Assign an Economy Seat" ... if you like.
Your should only print the seating chart when that selection is chosen from the menu.
note: plz do this by following my instructions everytime the solution u gave me was not following my instructions.
Describe a societal issue related to cloning
: Explain why the phenotype of the cloned mammoth would be similar to the woolly mammoth and not to the elephant egg donor or surrogate elephant mother
|
Write a screen saver program that generates random shapes
: Write a Screen Saver program that generates random shapes of random colors and sizes at random positions within the display area. Add controls so typing different keys on the keyboard cause the window to change size and background color as describ..
|
Find the speed of the approaching police car
: Two police cars have identical sirens that produce a frequency of 560 Hz. Find the speed of the approaching police car
|
How fast was it traveling when it reached the bottom
: In the Blackhawk landslide in California, a mass of rock and mud fell 465 m down a mountain and then traveled 8.3 km across a level plain. How fast was it traveling when it reached the bottom
|
Write a program that can be used to assign seats
: Write a program that can be used to assign seats for a commcommercial airplane. The airplane has 13 rows, with 6 seats in each row. Rows 1 and 2 are first class, rows 3 to 7 are business class, and rows 8 to 13 are economy class
|
What intensity of light emerges
: The unpolarized light of intensity I(not) is passed through two polarizers with axes oriented at 30degrees from each other. What intensity of light emerges
|
Find the absolute pressure in the bulb
: A meat baster consists of a squeeze bulb attached to a plastic tube. When the bulb is squeezed and released, find the absolute pressure PB in the bulb
|
Describe binary tree traversals
: Describe binary tree traversals (inorder, postorder, preorder and level-order). Give examples of applications of these traversals.
|
Determine the total force the man must exert on bar ab
: A man having a weight of 167lbattempts to hold himself using one of the two methods. Determine the total force he must exert on bar AB in each case and the normal reaction he exerts on the platform at C.
|