d. Applied Task
VCE Applied Computing - Student Task Sheet
Unit 1 Area of Study 2 - Programming Foundations: Data, Variables and Operators
Scenario
You are designing a School Event Cost Calculator.
The program should:
- store the event name
- store the ticket price
- store the number of tickets selected
- calculate the total cost
- check whether the quantity entered is valid
Task 1 - Choose data types
(4 marks)
Select an appropriate data type for each of the following and justify each choice briefly:
- event name
- ticket price
- number of tickets
- whether the quantity is valid
Task 2 - Variables and expressions
(4 marks)
Write variable names and expressions that would allow the program to:
- store the ticket price
- store the quantity
- calculate the total cost
Your response should show appropriate variable initialisation.
Task 3 - Build a validity condition
(4 marks)
The quantity must be between 1 and 10 inclusive.
Write a condition that checks this rule and explain:
- which conditional operators you used
- which logical operator you used
Task 4 - Pseudocode
(4 marks)
Write pseudocode for a short program that:
- accepts the event name
- accepts ticket price and quantity
- calculates the total
- displays the result
Extension Discussion (2 marks optional)
Explain how poor variable naming or poor data type choices could make this program harder to debug later.