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
Data files whose records are always retrieved in sequence from the beginning of the file are known as
dimaraw [331]

Answer:

sequential files

Explanation:

Q:

Data files whose records are always retrieved in sequence from the beginning of the file are

A:

sequential files

3 0
2 years ago
Identify a logical operation (along
tankabanditka [31]

Answer: Provided in the explanation section

Explanation:

The Question says;

Identify a logical operation (along

with a corresponding mask) that, when

applied to an input string of 8 bits,

produces an output string of all 0s if and

only if the input string is 10000001.​

The Answer (Explanation):

XOR, exclusive OR only gives 1 when both the bits are different.

So, if we want to have all 0s, and the for input only 10000001, then we have only one operation which satisfies this condition - XOR 10000001. AND

with 00000000 would also give 0,

but it would give 0 with all the inputs, not just 10000001.

Cheers i hope this helped !!

3 0
3 years ago
The process known as "bitmapping" is defined as information in _____. <br><br> finish the sentence.
valentina_108 [34]

graphics is the answer

4 0
2 years ago
What are the 3 main colors for a computer screen?
zhuklara [117]

Answer:

Red, Green, and Blue.

Explanation:

These colors make up white light

4 0
2 years ago
Read 2 more answers
Television and movies are an important medium of communication. Perform online and offline research, and describe the history of
iren2701 [21]

Answer:

The American film industry, popularly called Hollywood, has played an important role as a platform for communication. It has influenced audiences the world over. The history of Hollywood begins in 1910 with the silent movie In Old California. The 1920s saw the arrival of movies with sound and music. In the 1940s, during and after World War II, movies were made on themes related to war. In the 1950s, Hollywood movies began to compete with television, as television entered American homes. Cutting to the 1990s, the use of animation in movies began to rise. The 2000s saw a continuation of this trend. Movies are now made using the most advanced technology and effects.

Hollywood movies play an important role in the communication process. It can bridge the gap between different communities, cultures, races, and nations. For example, the movie The Help highlighted the gross discrimination the Blacks suffered during the 1960s. Movies have also played a great role in building harmony between cultures. For example, the movie Eat, Pray, Love explores Eastern cultures. Animated movies are enjoyed by movie lovers of all ages, and often end with a good message.

Explanation:

PLATO

7 0
2 years ago
Other questions:
  • If you work up to your potential but fall short of your goals, you
    15·2 answers
  • Using information from the lesson, explain how new technologies change your experience as a consumer.
    5·2 answers
  • __ is/are the amount of blank space between lines of text in a paragraph
    7·2 answers
  • Ada lovelace designed the first computer
    7·1 answer
  • Mark works as a Network Administrator for NetTech Inc. The company has a Windows Server 2008 domain-based network. The network c
    7·1 answer
  • What is an example of CT SO?
    9·1 answer
  • Meaning of sperm count
    5·2 answers
  • One rule in the Java programming language is that you have to place a semicolon at the end of each statement. What is this rule
    10·2 answers
  • Aurelia is designing a user interface for a new game app. Which of the following should she taken into consideration for the use
    7·1 answer
  • What is it called when you define a variable for the first time
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!