This is the challenge dealing with the creation of helper methods from lessons 31 to 34, called ChallengePostalCalculatorHelperMethods. The goal of this challenge is for you to design a simple postage calculator that takes input from the user and outputs the price of shipping. You’ll need to use helper methods to accomplish this; you can’t just hard-code the results.
The full list of requirements for this challenge can be found in the CS-ASP_034-Challenge folder. You must name the project ChallengePostalCalculatorHelperMethods.
The first requirement is to accept width, height and optionally the length of a parcel. Accept the shipping method – Ground, Air, Next Day:
The next requirement is, once you have the minimum amount of information you need, produce a result on screen. The result will be the volume of the package (width * height and optionally * length) multiplied by the "multiplier" for each shipping method.
Ground: .15 multiplier
Air: .25 multiplier
Next Day: .45.
For example, if the user inputs the width and height as 5 and 4 respectively, then selects Next Day, the calculation would be (5* 4 * .45).
You will not use an okButton or submitButton in this application. All the updates should happen automatically as soon as the information is input.
This challenge doesn’t require a tremendous amount of code, but it does require you to think through the different aspects of helper methods and their uses. There are several steps to completing this challenge, and it’s easy to become confused in the process. As a tip, try to "map out" your code using common words before writing it out. Create a step-by-step plan, then execute it.
If you review the last few lessons and do your best, I know you can solve this. It might not be identical to the solution provided, but any solution that meets the requirements is acceptable. Good luck!