Movie theater order tracking system.
A data file will contain the following information:
ticket-type quantity
Each order will be on a single line.
A ticket type consists of a single letter for the type of ticket
ordered. Ignore invalid ticket types. Values are case insensitive (A or a
is value, for example).
Ticket types are:
A - Adult
C - Child
S - Senior
Quantity is the amount of tickets ordered. Value orders are 1 or more.
0 and negitive values are invalid.
Ticket fees:
Adults are $10
Children are $5
Seniors are $7.50
Have your program list the orders for each ticket in the file. For each
order:
List the ticket type (using it's name: Adult, Child, Senior)
Quantity ordered
Order total.
For the price of the tickets, you MUST use constants.
After the file has reached the end of the file, list the report's
summery.
Total tickets overall, and for each type of ticket.
List the amount of money for all orders, and for each of the ticket
types.
Sample data file to use:
A 1
C 1
S 1
A 0
C -1
S 0
E 10
A 2
C 2
S 2
s 1
a 2
c 3
Tools you'll need:
while loop
file
if else statements
constants
Output: Create an outfile consisting of the follow.
Try to use the width command, to have the output line up neatly.
Ticket Type Quantity Price
Adult 1 $ 10.00
Child 1 $ 5.00
Adult 2 $ 20.00
.
.
.
.
SUMMARY:
Adults: ___ Amount: $___
Children: ___ Amount: $___
Seniors: ___ Amount: $___
Total Tickets: ____
Total: $___
When the program is finished, have notepad, open the output file. Use the system command for this.