Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / A program is required to get the length and width of a rectangular block, and then the length and width of a rectangular house on that block

A program is required to get the length and width of a rectangular block, and then the length and width of a rectangular house on that block

Computer Science

A program is required to get the length and width of a rectangular block, and then the length and width of a rectangular house on that block. The total mowing time to cut the grass (the ground all around the house is covered by grass) is then calculated and displayed, where is mowing is at the rate of 2 square metres per minute. For the following algorithm

 

a.      create 2 test sets (inputs and expected outputs)

 

b.     desk check it thoroughly

c.      verify the actual results against expected results

Calculate_mowing_time

Prompt for blockLength, blockWidth Get blockLength, blockWidth blockArea = blockLength * blockWidth

 

Prompt for houseLength, houseWidth Get houseLength, houseWidth houseArea = blockLength * blockWidth

 

mowingArea = houseArea - blockArea mowingTime = mowingArea / 2

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions