1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
IrinaVladis [17]
3 years ago
9

Create a program named PaintingEstimate whose Main() method prompts a user for length and width of a room in feet. Create a meth

od that accepts the values and then computes the cost of painting the room, assuming the room is rectangular and has four full walls and 9-foot ceilings. The price of the job is $6 per square foot. Return the price to the Main() method, and display it.
Computers and Technology
1 answer:
mario62 [17]3 years ago
7 0

Answer:

   public static double paintingCost(double roomLength, double roomWitdth){

       double roomDimension = roomLength*roomWitdth;

       double ceilingCost = 6*9; //Since the ceiling is 9-feets ($6/feet)

       double totalCost = (roomDimension*6)+ceilingCost;

       return  totalCost;

   }

Using Java programming language, A complete program is with a call to the method is given in the explanation section

Explanation:

import java.util.Scanner;

public class PaintingEstimate {

   public static void main(String[] args) {

       System.out.println("Please Enter the Length and Width of the Room in Feets");

       Scanner in = new Scanner(System.in);

       double roomLen = in.nextDouble();

       double roomWit = in.nextDouble();

//Calling the method in the output statement

       System.out.println("The total cost of painting the walls and ceiling is:  "+paintingCost(roomLen,roomWit)+" dollars");

}

   public static double paintingCost(double roomLength, double roomWitdth){

       double roomDimension = roomLength*roomWitdth;

       double ceilingCost = 6*9; //Since the ceiling is 9-feets ($6/feet)

       double totalCost = (roomDimension*6)+ceilingCost;

       return  totalCost;

   }

}

You might be interested in
Which of the following blocks is least similar to the others?
GuDViN [60]
The answer is A or B
4 0
3 years ago
Read 2 more answers
? Create a home page that introduces the rental car company. the page should have a header and footer. in the document body, it
Anestetic [448]
You need some more criteria. Is this a webpage? If so.. What language(s) are applicable for writing your web application. My profession is systems development, do I do a lot of fronte-end/ back-end development. I don't mind helping, just need some more information. If not what resource does this need to be created in?
7 0
2 years ago
Does anyone know about the progressive era?
Umnica [9.8K]

Answer: The Progressive Era was a period of widespread social activism and political reform across the United States that spanned the 1890s to the 1920s.

Explanation:

8 0
3 years ago
Read 2 more answers
Which type of footwear should be worn while working on a hybrid vehicle?
Dmitrij [34]

Hello there!

Shoes with rubber souls would be the best bet.

7 0
3 years ago
Read 2 more answers
A Uniform Resource Locator (URL) is a formatted string of text that web browsers, email applications, and other software program
Fiesta28 [93]

The purpose of a URL is to help users get to websites easier. A URL (Uniform resource locator) is that tab at the top of your web browser that you type into. Like if you want to go to google, you would type in Google.com. So the answer is true.

6 0
3 years ago
Read 2 more answers
Other questions:
  • How do smart watches affect the business and its position in the global marketplace?
    12·2 answers
  • What is a way to Procter your social security number and other sensitive information from identity theft
    9·1 answer
  • Which of the following binary (base-2) numbers is LARGEST?
    14·1 answer
  • 100 POINTS PLEASE HELP ASAP!!!!!
    5·2 answers
  • As an administrator for the Contoso Corporation, your primary office is in Sacramento and your data recovery site in Las Vegas.
    15·1 answer
  • Write a program to display the roll number of students who have scored 100 in math. display appropriate message if none have sco
    5·1 answer
  • PLZ ANSWER THESE QUESTIONS FOR 30 POINTS AND BRAINLIEST!
    9·1 answer
  • Why has base 2 been accepted and used as the basis for computing?​
    8·1 answer
  • Explain the three schemes via which the binding of instructions and data to memory addresses can be done. In each scheme, how th
    13·1 answer
  • 25 Points Asap <br> Write a Java program named Light.java that displays a light bulb shown below:
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!