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
Bank of America sends out customer surveys to all of its customers asking them about the services they offer. What type of resea
ValentinkaMS [17]

Answer:

<u>Market research</u>

Explanation:

<u>Market research:</u> The term "market research" is described as a process of describing the viability of a new product or service via specific research that is being conducted directly with the different potential customers. Therefore, market research allows a specific company to discover or identify the target market and receive opinions and some other feedback from various consumers regarding their interest associated with the service or the product.

<u>In the question above, the given statement represents market research.</u>

4 0
3 years ago
Bytes are arrangements of
tigry1 [53]
The answer is B. Eight bits
7 0
3 years ago
Which headphones are a better option, the HyperX Cloud Stinger or the Logitech G432
seropon [69]

Answer:

The Logitech ones.

Explanation:

Surprisingly I've used all 3 of them and the Logitech ones are the one with not only the best sound quality. And the mic isn't horrible either.

6 0
3 years ago
Methods can be ____ correctly by providing different parameter lists for methods with the same name.
Serjik [45]
To complete the sentence - Methods can be overload methods correctly by providing different parameter lists for methods with the same name. 

Thank you for posting your question here at brainly. I hope the answer will help you. Feel free to ask more questions.
7 0
3 years ago
When you adopt a certain framework or strategy for solving a series of problems, you may fail to see other, more efficient ways
Olegator [25]
I believe it is called closed mindset. Closed mindset is when you fail to see other ways to your error and don't accept help or think you can improve.
7 0
3 years ago
Other questions:
  • Why don't we get together to watch the Academy Awards?
    15·2 answers
  • Propose, two new, proudly South African ways, which you can visualize that the internet of things, can be used in at work to mak
    7·1 answer
  • .How does kinetic energy affect the stopping distance of a vehicle traveling at 30 mph compared to the same vehicle traveling at
    13·1 answer
  • Q1: what is significant about the contents of the destination address field?
    12·2 answers
  • How to revert a dismissed javascript popup alert box in chrome?
    5·1 answer
  • This form of analysis is an extension of what-if analysis and is the study of the impact on other variables when one variable is
    8·1 answer
  • DJ Davon is making a playlist for an internet radio show; he is trying to decide what 1212 songs to play and in what order they
    12·1 answer
  • Which of the follow will happen if you miss a monthly credit card payment?
    11·1 answer
  • python. create a program that asks the user to input their first name and their favorite number. Then the program should output
    12·1 answer
  • A computer is the __________ of an attack when it is used to conduct an attack against another computer.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!