Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Banana Republic Airways (BRA) has just purchased a computer for its new automated reservation system. The company has flights from zmir to six other

The Banana Republic Airways (BRA) has just purchased a computer for its new automated reservation system. The company has flights from zmir to six other cities in Turkey. The cities are referred to by number, 1 to 6. The prices for one-way flight ticket to each city are as follows: City Code 1 2 3 4 5 6 Price(TL) 55 45 45 75 35 65 Each flight has a boarding capacity of 15 seats; they are numbered from 1 to 15. You are supposed to write a program that processes the order of each customer. The program should get the name of the passenger, the code of the destination city, and the number of tickets desired with a maximum of 5 tickets per sale. If the passengers order is completely satisfied, the program let the user choose the seat numbers from the displayed list of free seats in that flight and display the cost, otherwise continues with the next passenger by displaying an appropriate message. You will design your test cases for 10 passengers orders such that the code (a value between 1 and 6) and number of ticket (a value between 1 and 5) are generated randomly. You should only enter the name of the passenger, (that you design your code to choose from list of 10 names though). Do not forget to display random values in the output for each case Finally, after having processed 10 orders and the program should display the total number tickets sold to each of the six cities as well as the name of the passenger with their seat numbers in that flight and the grand total of all the ticket prices. For simplicity assume that one passenger that requires more than one ticket will use the same name his/her tickets.image text in transcribed

The Banana Republic Airways (BRA) has just purchased a computer for its new automated reservation system. The company has flights from izmir to six other cities in Turkey. The cities are referred to by number, 1 to 6. The prices for one-way flight ticket to each city are as follows: City Code1 4 6 Price(TL) 45 45 75 35 65 Each flight has a boarding capacity of 15 seats; they are numbered from 1 to 15. You are supposed to write a program that processes the order of each customer. The program should get the name of the passenger, the code of the destination city, and the number of tickets desired with a maximum of 5 tickets per sale If the passenger's order is completely satisfied, the program let the user choose the seat numbers from the displayed list of free seats in that flight and display the cost, otherwise continues with the next passenger by displaying an appropriate message You will design your test cases for 10 passenger's orders such that the code (a value between 1 and 6) and number of ticket (a value between 1 and 5) are generated randomly. You should only enter the name of the passenger, (that you design your code to choose from list of 10 names though). Do not forget to display random values in the output for each case Finally, after having processed 10 orders and the program should display the total number tickets sold to each of the six cities as well as the name of the passenger with their seat numbers in that flight and the grand total of all the ticket prices. For simplicity assume that one passenger that requires more than one ticket will use the same name his/her tickets

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions