Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions