A program is needed to allow a Wildlife Park to sell tickets.
A booking consists of one or more tickets for the same day(s) and can be made up to a week in advance.
A booking can be made for a visit of one day or two consecutive days. A booking can have extra attractions included.
A booking will be valid for the day(s) chosen only.
| ticket type | cost for one day | cost for two days |
|---|---|---|
| one adult | $20.00 | $30.00 |
| one child | $12.00 | $18.00 |
| one senior | $16.00 | $24.00 |
| family ticket | $60.00 | $90.00 |
| groups | $15.00 | $22.50 |
*NOTE: an adult may bring up to two children
**NOTE: a family ticket is up to two adults or seniors, and three children
***NOTE: a group is six people or more, price per person
| extra attraction | cost per person |
|---|---|
| Lion feeding | $2.50 |
| penguin feeding | $2.00 |
| evening barbecue | $5.00 |
Note: evening barbecue is for 2-day tickets only
Using arrays, design a system to allow the above data to be stored in a computer program.
The data should be displayed meaningfully (see example above):
Watch this video for an idea to help you get started. Note: you may have a better idea to help you organise the data.
Your program needs to:
Watch this video for an idea to help you get started. Note: you may have a better idea to help you process a booking.
Set up your program to:
Check that the total for each booking gives the best value and offer an alternative if this is not the case.
For example, buying two family tickets is better than a group ticket for a group of 10 that includes four adults and six children.
One tip is to make a list of things that your program needs to do before you start coding - you could do this as comments in Python eg
#create an empty array
#create a loop to do something 5 times
#ask the user to input a number in the loop
#append the number to the array in the loop
#calculate statistics in the loop
#display all data and statistics after the loop
Then... start coding!