Data Input:
The data input that will be entered for the receipt is the staff name, the date and the film the customer would like to watch. For example Deadpool or Goosebumps as the cinema is only showing these two films at the moment.
What are the choices in the program and what are the outcomes?
The choices you can make in the program are the number of tickets. For example how many tickets the customer would like to buy. The prices of the tickets that the customer has bought. For example if the customer buy one adult ticket then it will cost the customer £10.30.
Calculations performed by the program:
Calculations Explanation
£10.30*1 = £10.30 Price adult ticket
£10.30-20% = £8.24 Price senior citizen ticket
£10.30/2 = £5.15 Price …show more content…
The output on the receipt will be the name of the cinema name “Empire cinema”, the film the customer is watching (Deadpool or Goosebumps), the name of the staff that took the order, the number of ticket in the order of the type of ticket, the cost of the ticket in terms of the type of ticket, the total the customer will have to pay for the tickets and the seat number of the customer.
Variables used in the program
Variables Meaning Data type
Last name The last name of the customer String
Item price The price of the ticket Float
What will be the opening message on the receipt?
The opening message on the receipt will be the “Welcome to Empire cinema” and the date of the day the ticket was printed.
What will be the closing message on the receipt?
The closing message on the receipt will be “Thank you for coming” and this will be at the end of the receipt.
Test data table
Input Calculation Output
One adult ticket £10.30 * 1 Adult ticket = £10.30
One child ticket £10.30 / 2 Child ticket = …show more content…
Also the program will do whatever the programmer programmed it to do.
Functions: Functions are like procedures however they return using a value. Functions also uses parameters, returns values and it may be detached from the main body of the code.
Pre-defined functions: Pre-defined functions are any set of subroutines that complete ordinary mathematical tasks.
Local variables: Local variables may only be used in the area it has been located in. For example an operation may only be done in that area and not in any other area of the