You will write a program to create an airline reservation system for a small airline. You...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
You will write a program to create an airline reservation system for a small airline. You are to write a program to assign seats for a flight with a capacity of 10. (Assume 1 seat per row) Your program will have a menu that allows the user to choose the following: 1. First Class 2. Economy 3. Exit Seating Chart: ['A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A'] Choice == If the user selects option 1, user will be prompted to select a seat between rows 1 and 5. User should only be able to select a seat from 1 to 5. Program should display an appropriate message if user selects any other seat. If the user selects option2, user will be prompted to select a seat between rows 6 and 10. User should only be able to select a seat from 6 to 10. Program should display an appropriate message if user selects any other seat. (Rows: 1 to 5) (Rows: 6 to 10) When user is given the option to select the type of seat, it should also display the seating chart with which seats are available and which seats are taken. You need to create a list to represent the seating chart of the plane. Initialize all elements of the list to "A" for available. As the seats are occupied, the A should be replaced by "X" for no longer available. If a section reaches full capacity, then the program should display "Full" next to the menu option. For example, if there were no more seats available in First Class then it will display: 1. First Class 2. Economy 3. Exit (Rows: 1 to 5) (Rows: 6 to 10) Full Seating Chart: ['X', 'X', 'X', 'X', 'X', 'A', 'A', 'A', 'A', 'A'] Choice ==> The program should continue to run until user selects option 3 to exit the program. Your program needs to be modular( at a minimum you need to have the following four functions: firstClass, economy, menu, main Your program needs to have the same menu as shown in the output below. You will write a program to create an airline reservation system for a small airline. You are to write a program to assign seats for a flight with a capacity of 10. (Assume 1 seat per row) Your program will have a menu that allows the user to choose the following: 1. First Class 2. Economy 3. Exit Seating Chart: ['A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A'] Choice == If the user selects option 1, user will be prompted to select a seat between rows 1 and 5. User should only be able to select a seat from 1 to 5. Program should display an appropriate message if user selects any other seat. If the user selects option2, user will be prompted to select a seat between rows 6 and 10. User should only be able to select a seat from 6 to 10. Program should display an appropriate message if user selects any other seat. (Rows: 1 to 5) (Rows: 6 to 10) When user is given the option to select the type of seat, it should also display the seating chart with which seats are available and which seats are taken. You need to create a list to represent the seating chart of the plane. Initialize all elements of the list to "A" for available. As the seats are occupied, the A should be replaced by "X" for no longer available. If a section reaches full capacity, then the program should display "Full" next to the menu option. For example, if there were no more seats available in First Class then it will display: 1. First Class 2. Economy 3. Exit (Rows: 1 to 5) (Rows: 6 to 10) Full Seating Chart: ['X', 'X', 'X', 'X', 'X', 'A', 'A', 'A', 'A', 'A'] Choice ==> The program should continue to run until user selects option 3 to exit the program. Your program needs to be modular( at a minimum you need to have the following four functions: firstClass, economy, menu, main Your program needs to have the same menu as shown in the output below.
Expert Answer:
Related Book For
Modern Mathematical Statistics With Applications
ISBN: 9783030551551
3rd Edition
Authors: Jay L. Devore, Kenneth N. Berk, Matthew A. Carlton
Posted Date:
Students also viewed these programming questions
-
Write the data statements for R, L, and C given in Fig. 15-2. The third statement for the capacitor connection specifies one node only. The missing node is always taken to be the reference node....
-
TASKS The task is to Write academic integrity comment in "pizza_shop.py" (Modify the first comment in the file) Write academic integrity comment in "test_driver.py" (Modify the first comment in the...
-
What do you believe is the most challenging aspect of using the economic analysis workbook? Briefly describe the challenge and any suggestion you have to reduce the challenge.
-
Imagine you are interested in whether there is a significant difference between the mean age of marriage across educational groups. If the F statistic is 6.10, use the data below to determine the...
-
a. Explain how Jackies uses its LRAC curve to decide how many canoes to rent. b. Does Jackies production function feature economies of scale or diseconomies of scale? The table shows the production...
-
\(X\) is the number of bits in error in the next four bits transmitted. What is the expected value of the square of the number of bits in error? Now, \(h(X)=X^{2}\). Therefore, \[ \begin{aligned}...
-
A training center, wishing to demonstrate the effectiveness of their methods, tests some of their clients after different numbers of days of training, recording their scores on a sample test. Their...
-
3.On January 1, a company retired $800,000 face value bonds at a call price of 103. The bonds were originally issued for $848,000. On the retirement date the bonds had an unamortized premium of...
-
2.1 Leadership may be defined as the process by which an individual exerts influence over other people and inspires, motivates, and directs their activities to help achieve group or organisational...
-
Med Diagnostics Inc. borrowed \($200\),000 from a lender for a new blood analyzer module to improve accuracy and consistency of its tests. The rate was 6 percent, 2 percent above the prime rate. The...
-
Recall Problem 34. Shortly before Jerry got under way with his job and investment plan, he met Jennifer. All of a sudden, he decided to put the retirement plan on hold, reasoning that 40 years is a...
-
What is the effective annual interest rate for 5 percent compounded (a) semiannually, (b) every 4 months, (c) quarterly, (d) every other month, (e) monthly?
-
If \($5\),000 is borrowed today and \($8\),955 is paid back in 10 years, what interest rate compounded annually has been earned?
-
Using the economic balance sheet approach, the Laws economic net worth is closest to: A. \($925\),000. B. \($1\),425,000. C. \($1\),675,000. Meg and Cramer Law, a married couple aged 42 and 44,...
-
Consider the following hypothesis test: H: 45 H: < 45 A sample of 36 is used. Identify the p-value and state your conclusion for each of the following sample results. Use =.01. a. x = 44 and s...
-
on 8 For the following set of lengths 130, 170, 160, 160, 150, 190 Third quartile is: et red d out of Select one: O a. 160 a question O b. 145 O c. 175 O d. 180
-
Image segmentation is a key tool in computer vision (i.e., helping computers see the meaning in pictures). The article Efficient Quantum Inspired Meta-Heuristics for Multi-Level True Colour Image...
-
Let X have a standard gamma distribution with = 7. Evaluate the following: a. P(X 5) b. P(X < 5) c. P(X > 8) d. P(3 X 8) e. P(3 < X < 8) f. P(X < 4 or X > 6)
-
Suppose that each of n randomly selected individuals is classified according to his/her genotype with respect to a particular genetic characteristic and that the three possible genotypes are AA, Aa,...
-
Aside from Calories, what else do you need to obtain through your diet? (a) a complete protein (b) a complete carbohydrate (c) vitamins and minerals (d) both a complete protein and vitamins and...
-
The stretchy sac where urine is temporarily stored is the (a) renal pelvis. (b) bladder. (c) ureter. (d) urethra.
-
How do the structures of the alveoli and their surrounding capillaries facilitate gas exchange?
Study smarter with the SolutionInn App