Finding A Solution
With the task defined and the Inputs/Outputs specified … Decide how the task will be solved?
The best advice is “Formulate a ‘high level solution’ and then refine each operation into simpler form.”
Solution considerations …
- There are two user inputs, size and shots, and they can be given in either order
- The proper basePrice must be computed from size
- The figureTax procedure is needed to compute the sales tax from the subTotal … this is simply 0.086*subTotal
- The subTotal, which is basePrice + shots*0.65, must be computed … can be used in computing the price
- The price must be computed … subTotal + figureTax(subTotal)
- The result must be displayed