Question: Create a program to compute the wall area of a room and calculate the paint andprice needed to decorate it. We assume that a gallon

Create a program to compute the wall area of a room and calculate the paint andprice needed to decorate it. We assume that a gallon of paint covers about 350 squarefeet of wall space. The program will use main() and 2 additional methods.Main() will use a JOptionPane.showInputDialog to prompt users for the length,width, and height of a rectangular room.Main() method will pass these THREE values to a method that does the following:- calculates the wall area for a room (wall area for a room = area of all four walls...)- passes calculated area to another method that calculates and returns # gallons paint needed- displays the number of gallons needed- computes price based on $32/gallon (assumes painter can buy any fraction of a gallon atsame price as whole gallon)- returns the price to the main() methodThe main() method will then use a JOptionPane.showMessageDialog box todisplay the final price.For example, the cost to paint a 15-by 20-foot room with 10-foot ceilings is $64.

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 Databases Questions!