20. Compute mowing time Problem: A program is required to read from the screen the length and width of a rectangular house block, and the length and width of the rectangular house that has been built on the block. The algorithm should then compute and display the mowing time required to cut the grass around the house, at the rate of two square meters per minute. Work out the algorithm using pseudo code. Rearrange the following lines to suit the requirements. house_area = house_length* house_width Output mowing_time to screen Calculate_mowing_time block_area = block_length* block_width Get house_length, house_width END Get block_length, block_width Prompt operator for block_length, block_width mowing_area = block_area-house_area mowing_time = mowing_area/2 Prompt operator for house_length, house_width Implement the program in Java.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter12: Adding Functionality To Your Classes
Section12.2: Providing Class Conversion Capabilities
Problem 3E
icon
Related questions
icon
Concept explainers
Question

H1.

 

20. Compute mowing time
Problem: A program
is required to read from the screen the length and width of a rectangular
house block, and the length and width of the rectangular house that has been built on the
block. The algorithm should then compute and display the mowing time required to cut the
grass around the house, at the rate of two square meters per minute.
Work out the algorithm using pseudo code.
Rearrange the following lines to suit the requirements.
house_area = house_length * house_width
Output mowing_time to screen
Calculate_mowing_time
block_area
Get house_length, house_width
END
= block_length * block_width
Get block_length, block_width
Prompt operator for block_length, block_width
mowing_area = block area -house_area
mowing _time = mowing_area/2
Prompt operator for house_length, house_width
Implement the program in Java.
Transcribed Image Text:20. Compute mowing time Problem: A program is required to read from the screen the length and width of a rectangular house block, and the length and width of the rectangular house that has been built on the block. The algorithm should then compute and display the mowing time required to cut the grass around the house, at the rate of two square meters per minute. Work out the algorithm using pseudo code. Rearrange the following lines to suit the requirements. house_area = house_length * house_width Output mowing_time to screen Calculate_mowing_time block_area Get house_length, house_width END = block_length * block_width Get block_length, block_width Prompt operator for block_length, block_width mowing_area = block area -house_area mowing _time = mowing_area/2 Prompt operator for house_length, house_width Implement the program in Java.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT