Question: Write a program with a custom, void method that determines the cost of painting the walls and door of a windowless, rectangular garage. One coat

Write a program with a custom, void method that determines the cost of painting the walls and door of a windowless, rectangular garage. One coat of paint will do it. The custom method does all of the work. The main method simply calls it. The custom method must prompt the user for the:

  • Garage dimensions in feet.

  • Cost of one can of paint.

  • Area in square feet covered by one can of paint.

All inputs could have decimals. The method should print:

  • Area to be painted accurate to one decimal place.

  • Number of cans of paint required. Use a method of class Math to round up the number of cans required.

  • Total cost of painting the garage.

Sample Output (inputs in italics)

Enter garage length, width, and wall height

40 30 10

Enter cost of one can of paint

35

Enter square feet covered by one can of paint

400

Area to be painted is 1400.0 sq ft

Cans of paint required: 4

Cost of painting garage: $140.00

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!