Answer to Question #46042 in Java | JSP | JSF for kiba

Question #46042
Code a program to calculate the time in minutes for someone to cut a yard. Input the length and width of the yard in feet. Input the length and width of the house in feet. Subtract the area of the house from the area of the yard to determine the amount of grass to be cut. Using 2 square feet per second as the rate at which you can cut the grass (set this up as a constant), determine how long it will take someone to mow the lawn, in minutes.
The program should print:
Length and width of yard
Length and width of house
Area to be cut in square feet
Time to mow the yard in minutes

Input data: (run three times)
Yard - 1500 X 1600 feet
House - 500 X 700 feet

Yard – 4850 X 6000
House – 1000 X 2000
1
Expert's answer
2014-09-24T03:47:22-0400
              System.out.println("Widthof the house: ");
float hWidth = scanner.nextFloat();

float time = (yLength * yWidth - hLength * hWidth) / 2;
System.out.format("Time:%.3f", time);

}

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS