Cp1401 - fundamentals of problem solving and programming -


Assignment - Planning the Tropical Airlines program

Task

You are to plan a plane ticket ordering program as described in the following description. Use what you have learned in class, including simple functions, selection and repetition. Assignment 2 will cover the implementation of this program in Python.

Program Features:

Short description:
The program will take the user through a series of choices to order a single ticket. Once the choices are made the program will display the user's choices and a final total for the ticket. The user will be asked if they would like to purchase another ticket or quit.

Detailed instructions:

1. Ask user's name and welcome them to the ordering system using name

2. Show program menu
(I)nformation (O)rder ticket
(E)xit

If user chose (O), continue on with the program, otherwise the program should exit with the message "Thank you for visiting Tropical Airlines".

If the user chose (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."

3. Ask if the ticket is for the user or for another person. If it is for another person, get the potential
traveller's name. For the following instructions you will need to keep track of the values and make all needed calculations at the end.

4. Ask if ticket will be one way or return (round trip)

5. Ask for the destination (choices are Cairns, Sydney or Perth).

6. Ask for the type of fare (Business, Economy or Frugal)

7. Ask what type of seat (Window, Aisle or Middle)

8. Ask age of person in order to check for child fare

9. Show user choices and total

10. Show user menu

Planning:
You are to divide your solution into functions, following the principles shown in class. These may involve one for each menu option (other than Quit) as well as functions for parts of the program (e.g. a calculating the total ticket price could be implemented as a function). For each function you are to provide an IPO chart listing all variables which are needed for your solution. In cases where selections are necessary you must include a suitable condition action table directly below the IPO chart. Follow the sample solution provided as a guide.

You also need to provide either an algorithm in pseudocode for each function, being sure to clearly indicate input and output variables for each.

In addition, you need to create a Flowgorithm flowchart that shows how the program would operate.

You may show your assignment to your tutor during practical time to get comments or suggestions. It is important to note that you can only get help from staff in practical time after your prac work is finished.

General Principles:
In this assignment, you will be focusing on basic planning using selections, repetition and functions.

Use the techniques and patterns that you have learned and seen demonstrated in class.
- Make use of named constants (named in all caps) where appropriate. You should be able to modify these constants to adjust the various costs of items such as one-way fare, return, discount for child tickets, etc. This is one of the most important aspects of this assignment, so consider carefully how to use constants. Remember to use your constants everywhere you can.

- Note that menu choice and other character selection should handle upper and lower case letters.

- You also must make sure that any functions that get input from the user do error checking to ensure that the input is within the expected range (greater than zero, etc).

Attachment:- Programming Assignment.rar

Solution Preview :

Prepared by a verified Expert
Python Programming: Cp1401 - fundamentals of problem solving and programming -
Reference No:- TGS02880146

Now Priced at $50 (50% Discount)

Recommended (94%)

Rated (4.6/5)