31 Jan 3. Once the (O) option has been entere
CP1401 SP53 2019 Assignment 2
Implement the Tropical Airlines program
Task
You are to implement (code in Python) a plane ticket ordering program as described in the following description. Use what you have learned in class, including simple functions, selection, repetition and lists. You should use any feedback that you received from Assignment 1 to improve your program flow.
See the last section of this document for sample output showing how the program should run.
Program Features:
Short description: The program will begin by asking the user for their name, welcoming them and then displaying a menu with three choices, as shown below. Choosing ‘Instructions’ or ‘Order’ will make the program perform the actions described below. If the user chooses to ‘Exit’ the program will display the costs of each order they have made using the program, and then a farewell message as described below. Any invalid value will produce an error message. After every menu selection (other than ‘Exit’) the menu will be displayed again.
The ‘Instructions’ option will display a short paragraph explaining the program, as shown below. The ‘Order’ option will take the user through a series of choices to order a single ticket. Once the choices are made the program will display a summary of the user’s choices and a final total for the ticket. After either of these options, the menu will be displayed again. When the user chooses (E)xit, a listing of the totals from the previous orders should be displayed with the output message “Your orders are:”, followed by the previous order totals in ascending order (smallest to largest) and a final total of all the orders combined. Then the message “Thank you for visiting Tropical Airlines” will be displayed.
See next page for Detailed Instructions.
Detailed instructions:
1. Ask for the user’s name and welcome them to the ordering system, using their name
2. Show the program menu:
(I) nformation (O)rder ticket (E) xit If the user chooses (I) display the following text:
“Thank you for choosing Tropical Airlines for your air travel needs. You will be asked questions regarding what type of ticket you would like to purchase as well as destination information. We also offer 50% discounted fares for children.”
If the user chooses (O) then the program will begin the process of ordering a ticket, as described below.
ALL other choices will produce an error. The menu will be displayed after every menu choice, except (E)
3. Once the (O) option has been entered, the program welcomes the user and asks if the ticket is for the user or for another person. If it is for another person, get the traveller’s name to display at the end, otherwise use the user’s name. For the following instructions you will need to keep track of the values and make all needed calculations at the end.
For this assignment you MUST ask the users for the following pieces of information in the order given, and you MUST allow for the specific inputs shown. Real world clients will often have the final say over the user interface, so this is a common restriction.
a. Ask if ticket will be one way or return (round trip)
b. Ask for the destination (choices are Cairns, Sydney or Perth).
c. Ask for the type of fare (Business, Economy or Frugal)
d. Ask what type of seat (Window, Aisle or Middle)
e. Ask age of person in order to check for child fare
f. Show user or traveller name, choices and total
4. If user chooses (E), the program should exit with the message: “[username], your orders are:” with a list of the ticket costs in ascending numerical order, then the message “Your final total is:” with the combined total and then the message “Thank you for visiting Tropical Airlines”.
Example: “[username], your orders are: $250, $300 and $550. Your final total is: $1100. Thank you for visiting Tropical Airlines.” You also must handle the situation where only one order is placed “[username], your order is: $250. Your final total is: $250. Thank you for visiting Tropical Airlines”.
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteEdu. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
Do you need help with this question?
Get assignment help from WriteEdu.com Paper Writing Website and forget about your problems.
WriteEdu provides custom & cheap essay writing 100% original, plagiarism free essays, assignments & dissertations.
With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Chat with us today! We are always waiting to answer all your questions.