Algorithms Final Project
Objective
- Define the problem by constructing an algorithm using pseudocode
- Create an IPO diagram showing input, output, and processing steps
- What control structures (sequence, selection and repetition) are required?
- What variables are required?
- Show a check of your solution with test data for at least two valid test cases
How much should a fence cost?
You've just been hired by Alton's Hardware Store. Your job is to develop a tool which will allow his customers to calculate the cost for installing a fence. Start by determining the algorithm to calculate the cost of installing the fence.
Create a program that will calculate the cost with tax of fencing a rectangular yard. The cost of the fencing will depend on the amount of fencing required (the perimeter of the yard), and the type of fencing used. Gates can are available for an additional cost. At least one gate is required.
Prices (including installation)
- Wooden fencing costs $25 per foot
- Chain-link fencing costs $15 per foot
- Gates cost $150 each. You must install at least one gate and can install up to 3
- Building Permit costs $50.00
- The tax rate is 6.0% but it doesn't apply to the building permit
Your algorithm should allow any other person to achieve the same result by following your steps. They should not have to think about what they are doing.
Would it be possible to automate the calculation by writing a program that follows the same steps? If not, change your algorithm.