ITECH2000 Mobile Development Fundamentals
This section of the online test will contain 1 long answer question worth . You will be required to develop some code in MIT AppInventor.
A local pizza shop wants you to develop an app to help their customers calculate the cost of orders. There are a range of factors
that determine how much an order will cost, as described below.
The base price of a pizza is $5. Customers have the choice to upgrade their pizza to a family size, in which case the base price of
the pizza increases to $8. In terms of toppings, every pizza (regardless of size) comes with 3 free toppings included in the
base price. For every additional topping that is added, it costs an extra $1 per topping.
A customer can choose to have their order delivered. If delivery is selected, the delivery cost is calculated based on the distance of delivery according to the following rules:
If the delivery distance is 5km or less, there is a flat $10 delivery fee.
If the delivery distance is greater than 5km, but no more than 10km, customers must pay a $10 delivery fee plus an additional $2.50 for every kilometre greater than 5.
If the delivery distance is greater than 10km, customers must pay a $25 delivery fee plus an additional $4 for every
kilometre greater than 10.
Write a procedure that calculates the correct price for a pizza based on the factors described in this scenario.