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
This technology was developed in the 1980s and was a successful attempt to provide services for voice, video, and video traffic
sveticcg [70]

Answer:

SONET was the only one on the list created near the 1980s (1985)

Good luck!

<em>~Awwsome</em>

8 0
3 years ago
In the wireless telecommunications industry, different technical standards are found in different parts of the world. A technica
Serhud [2]

Answer:

A varying infrastructure.

Explanation:

The competitive pressure it creates for multinational companies in the industry is one of difference in infrastructure because different technical standards are found in different parts of the world.

For instance, A technical standard known as Global Systems for Mobile (GSM) is common in Europe, and an alternative standard, Code Division Multiple Access (CDMA), is more common in the United States and parts of Asia.

Consequently, equipment designed for GSM will not work on a CDMA network and vice versa as a result of varying infrastructure, so companies would be innovative in order to improve on their products.

3 0
2 years ago
Fill in the blank - A generation of social-oriented, physical games such as the _______ Wii console, emerged in the late 2000s,
disa [49]

Answer:

wild bro just need points

Explanation:

6 0
3 years ago
A*=++a/6+b++ 3 if a=3,b=4​
Vinil7 [7]

Answer:

a=22.5

Explanation:

Given

a*=++a/6+b++3

Required

The result when a=3 and b=4

Analyzing the given instruction

a*=(++a)/(6)+(b++3)

Single out and solve the expressions in bracket

(++a) = a -- When the ++ operator appears before an operand, it is called pre increment. meaning that the operation will be done before the operand will be incremented.

So: in this case: ++a = a

b++3 = b + 3

The operator, as used in that statement is the same as: b + 3.

So:

a*=(++a)/(6)+(b++3)

a*=(a)/(6)+(b+3)

a*=(3)/(6)+(4+3)

a*=0.5+7

a*=7.5

The above expression is calculated as:

a=a*7.5

So:

a=3*7.5

a=22.5

8 0
3 years ago
From which tab can you format individual cell data like any other text? A.Design B. Home C. Table Tools Design D.Table Tools Lay
skelet666 [1.2K]
The answer to this question is the letter "B" which is the HOME tab. When you click the home tab, you can find the different number format in such a way that you can also format the individual cell, it could be data of any other text.
6 0
3 years ago
Other questions:
  • Write a Java program to print the result in the series 10, 15, 20, 25, ..., 50. Hint: You can use an iteration statement for wri
    9·1 answer
  • What is a good voltage measurement on a brand new, 6 volt golf cart deep cycle battery after the first charging?
    10·1 answer
  • You want to implement a mechanism that automates ip configuration, including ip address, subnet mask, default gateway, and dns i
    14·1 answer
  • Which of the following tends to be true of silent film acting as opposed to sound film acting?
    7·1 answer
  • This device is used to connect sections of large networks?
    12·2 answers
  • Suppose users share a 1-Gbps link. Also, suppose each user requires 200 Mbps when transmitting, but each user only transmits 30
    5·1 answer
  • If there are 18 people in your class and you want to divide the class into programming teams of 3
    7·1 answer
  • What is a common translator?​
    9·1 answer
  • What is the value of the variable named result after the following code executes?
    10·1 answer
  • What is the bandwidth for asymmetric digital subscriber line<br> (ADSL)?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!