Pseudo code for Calculate Weed Control Application

 

Description of Task

 

The cost of weed control is based on the square footage treated. The cost is .01 per 5 square feet for lawns an acre or larger (an acre = 43560 square feet) and .01 per 4 square feet for less than an acre. There is a minimum cost of $30.

 

Possible Solution Algorithm

 

 

Using Block If…Else statement

 

Get numeric value from square footage TextBox and store in Integral variable - SquareFootage

 

If SquareFootage >= 43560 

Divide SquareFootage by 5, multiply result by .01 store in Floating point variable - Cost

Else

Divide SquareFootage by 4, multiply result by .01 store in Floating point variable - Cost

End if

 

If Cost < 30

          Cost = 30

          End If

 

Set focus back to original balance TextBox