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
Illusion [34]
3 years ago
12

In order to paint a wall that has a number of windows, we want to know its area. Each window has a size of 2 ft by 3 ft. Write a

program that reads the width and height of the wall and the number of windows,.
Computers and Technology
2 answers:
Oksana_A [137]3 years ago
5 0

Answer:

The program in Java will be:

import java.util.Scanner;

public class Paint

{

   public static void main(String[] args)

   {

       final int COVERAGE = 350;  //paint covers 350 sq ft/gal

       final int DOOR = 20;

   final int WINDOW = 15;    

   //declare integers length, width, and height;

   int length, width, height, doors, windows;

   //declare double totalSqFt;

   double totalSqFt;

       //declare double paintNeeded;

   double paintNeeded;

     //declare and initialize Scanner object

   Scanner scan = new Scanner (System.in);

   //Prompt for and read in the length of the room

   // finish this -- length =  

   System.out.print("Enter the length of the room: ");

   length = scan.nextInt();

   //Prompt for and read in the width of the room

       System.out.print("Enter width: ");

   width = scan.nextInt();

       //Prompt for and read in the height of the room

   System.out.print("Enter height: ");

   height = scan.nextInt();

       //Prompt for and enter the number of doors    

   System.out.println("Enter the number of doors: ");

   doors = scan.nextInt();

   //Prompt for and enter the number of windows

   System.out.println("Enter the number of windows: ");

   windows = scan.nextInt();

   //Compute the total square feet to be painted--think

      //about the dimensions of each wall

       totalSqFt = 2 * width * height + 2 * length * height - DOOR*doors - WINDOW*windows;

       //Compute the amount of paint needed

       paintNeeded = totalSqFt / COVERAGE;

       //Print the length, width, and height of the room and the

       //number of gallons of paint needed.

   System.out.println("Length= " + length + "\nWidth= " + width +  "\nHeight= " + height + "\nNumber of doors: " + doors + "\nNumber of windows: " + windows + "\nGallons of Paint Needed= " + paintNeeded);

   

   }

}

Digiron [165]3 years ago
3 0

Answer:

6ft

Explanation:

Step 1:

import java.util.Scanner;

class AreaOfRectangle {

public static void main (String[] args)

{

Scanner scanner = new Scanner(System.in);

System.out.println("Enter the length of Rectangle:");

double length = scanner.nextDouble();

System.out.println("Enter the width of Rectangle:");

double width = scanner.nextDouble();

//Area = length*width;

double area = length*width;

System.out.println("Area of Rectangle is:"+area);

}

}

Output

Enter the length of Rectangle:

2

Enter the width of Rectangle:

3

Area of Rectangle is:6.0

You might be interested in
PLEASE HELP WILL MARK BRAINLIEST ASAP
Charra [1.4K]

Answer:

This is a heading

Explanation:

This is a paragraph does not exist. You would simply use p for paragraph. Therefore This is a heading is the correct answer.

8 0
2 years ago
Who else hates it when Edgenuity has technical problems with international students?
konstantin123 [22]

Answer: ya it sucks

AI used to be a A student until edgenuity had to be used.

Explanation:

7 0
3 years ago
Embedded computers usually are small and have limited hardware but enhance the capabilities of everyday devices. True or false?.
kati45 [8]

Embedded computers usually are small and have limited hardware but enhance the capabilities of everyday devices is a True statement.

<h3>Are embedded computers small?</h3>

Embedded computers are known to be machine that is said to be in smaller form  of their factor motherboards. An example is Mini-ITX .

Note that there are lot of Different forms of  embedded computers that has their specific innovative enclosure designs.

Therefore, based on the above, Embedded computers usually are small and have limited hardware but enhance the capabilities of everyday devices is a True statement.

Learn more about Embedded computers  from

brainly.com/question/9706390

#SPJ1

5 0
1 year ago
By default Windows desktop displays
ankoles [38]
Every time Windows starts, or unlocks from the start screen, the Start Button and Task Bar is always displayed by default.

You will also see, the system tray and desktop background but these vary based on the amount of apps installed and user choice of wallpaper, so wouldn't necessarily count as defaults. 
3 0
2 years ago
Which type of processing best describes the correction of errors or the rearrangement of a job's running time?
Neko [114]

Answer:

Real-time

Explanation:

i am sure because on my test it said corect

6 0
3 years ago
Other questions:
  • Some people are unable to arrange six matches to form four equilateral triangles because they fail to consider a three - dimensi
    6·1 answer
  • You are a network security administrator for a bank and you have noticed that an attacker has exploited a flaw in OpenSSL and fo
    9·1 answer
  • You can run a macro by:
    10·1 answer
  • You’ve just finished training an ensemble tree method for spam classification, and it is getting abnormally bad performance on y
    9·1 answer
  • Name two components required for wireless networking<br>(answer fastly)​
    12·1 answer
  • What does a file association specify?
    10·2 answers
  • When I click on someone who asked a question and i want to see there answer it is always blurred and when I asked a question I c
    8·1 answer
  • What is meant by editing a document​
    5·2 answers
  • Molly needs to access a setting in microsoft windows group policy to change the type of a network to which a computer is attache
    15·1 answer
  • What are the real-life applications of coding?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!