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
+
quester [9]

Answer:

Network administrator

5 0
3 years ago
Read 2 more answers
Taking a recipe and breaking it down into its individual sections, like ingredients, preparation, cooking instructions, and nutr
Anna11 [10]
1.For each of the following, give the name of an element from Period 4 (potassium to krypton), which matches the description.
Elements may be used once, more than once or not all.. Single line text.
(1 Point)
an element that reacts with water to produce a lilac flame

2.For each of the following, give the name of an element from Period 4 (potassium to krypton), which matches the description.
Elements may be used once, more than once or not all.. Single line text.
(1 Point)
an element used as an inert atmosphere

3.For each of the following, give the name of an element from Period 4 (potassium to krypton), which matches the description.
Elements may be used once, more than once or not all.. Single line text.
(1 Point)
an element that has a valency of 3

4.Write a balanced chemical equation for the reaction between potassium and water. (Non-anonymous question). .
(1 Point)

Upload file
File number limit: 1Single file size limit: 10MBAllowed file types: Word, Excel, PPT, PDF, Image, Video, Audio
5.For each of the following, give the name of an element from Period 4 (potassium to krypton), which matches the description.
Elements may be used once, more than once or not all.. Single line text.
(1 Point)
an element with a fixed valency of 2 that not is not in group 2
8 0
3 years ago
Read 2 more answers
Which is an example of the operation of a game?
SVEN [57.7K]

Answer:

D.  

The player uses a joystick to control the character.

Explanation:

The MEANING of operation is: "The fact or condition of functioning or being active."

This explains that the answer is D because you are using the joystick to control the character. Hope the helps.

6 0
2 years ago
Read 2 more answers
If Rahul wants to reduce his monthly spending, he should A get a better job. B reduce his fixed expenses. C reduce his variable
Ilia_Sergeevich [38]

Answer:

C. reduce his variable expenses.

Explanation:

There are two types of expenses: Variable expenses and Fixed Expenses. Fixed Expenses are the expenses that are fixed for every month and its difficult to reduce these expenses such as house rent, fuel or travel expenses to go for work, utility bills. These are almost fixed for every month and it is difficult to reduce them. On the other hand, variable expense are the expense that vary for every month and can reduce easily. These expenses includes eating outside at restaurants, clothing, enjoying and arranging parties.

Rahul should reduce his variable expense to reduce his spending. This could be the easier way to reduce the expenses and save more. First option is not valid as he want to reduce his spending, this shows that he is satisfied with his current job but worried about extra expenses each month. This is the reason option C is the better choice for him to reduce expense.

6 0
3 years ago
Differentiate the term, "bundling," as applied to a Mac/Apple computer and a PC.
saw5 [17]

Answer:

Mac comes with the up (or is bundled with) the up-to-date OS where with windows there are multiple flavors to choose from.

Explanation:

Sorry if its wrong

8 0
2 years ago
Other questions:
  • Suppose you send data to the 11111111 11111111 11111111 11111111 ip address on an ipv4 network. to which device(s) are you trans
    15·1 answer
  • What is a gutter margin?
    5·2 answers
  • Which of the following best describes a toolbar?
    7·1 answer
  • What is one property of a good hash code?
    11·1 answer
  • Unwanted email sent to large groups of people who did not request the communication is called _____
    12·1 answer
  • What is a geam in the ggplot2 system?
    5·1 answer
  • Mark and his team are working on a project that is due for delivery in the next few days. The team is using project management t
    10·1 answer
  • Write a list comprehension that creates a list containing the numbers that result from the values 1 through 10 being multiplied
    15·1 answer
  • Helpppppp me please cuz its due rn. put the correct word in the correct spot
    14·1 answer
  • WHO WANT P O I N T S.................................................
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!