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
Marrrta [24]
3 years ago
8

The ABC Carpet Company has asked you to write an application that calculates the price of carpeting for rectangular rooms. To ca

lculate the price, you multiply the area of the floor (width times length) by the price per square foot of carpet. For example, the area of floor that is 12 feet long and 10 feet wideis 120 square feet. To cover that floor with carpet that costs $8per square footwould cost $960. (12x10x8= 960)
Computers and Technology
1 answer:
Annette [7]3 years ago
8 0

Answer:

class RoomDimension

{

double length;

double width;

public RoomDimension(double len, double w)

{

length = len;

width = w;

}

public double getLength()

{

return length;

}

public double getWidth()

{

return width;

}

public double getArea()

{

return length * width;

}

public String toString()

{

String output;

output = "Room dimensions:\nLength: " + length + "\nWidth: " + width + "\nArea: " + getArea();

return output;

}

}

And the code for RoomCarpet.java:

class RoomCarpet //extends RoomDimension

{

RoomDimension size;

double carpetCost;

public RoomCarpet(RoomDimension dim, double cost)

{

size = new RoomDimension(dim.getLength(), dim.getWidth());

carpetCost = cost;

}

public double getTotalCost()

{

return carpetCost;

}

public String toString()

{

String output = size + "\nCarpet cost: $" + carpetCost * size.getArea();

return output;

}

}

You might be interested in
What is the difference between an electronic notebook and electronic flash cards?
Ivenika [448]

Answer:

A) Electronic notebooks store images, videos, notes, and voice recordings in one area, while electronic flash cards are study tools with information written on both sides.

Explanation:

Just took the test

Edge 2020

7 0
3 years ago
PLLZZZZZ HELP I WILL GIVE BRAINLIEST IF ANSWER IS RIGHT
Aloiza [94]

Answer:

The answer is candyCost = int(input("How much is the candy?"))

Explanation:

3 0
3 years ago
Read 2 more answers
) What is the ""Phantom Inspector""? (
matrenka [14]

Answer:

 Phantom inspection is the process of finding various defects in the documents according to the . Basically, it is a group of meeting that usually provide the synergy effects and the maximum defects can easily be detected. This entire process is known as phantom inspector.  

It is also made some assumptions regarding the inspection that is made by one and more than one individual.

This process are usually done by inspecting the each operation output with the given output requirements.

4 0
3 years ago
Plzzz help! It’s due soon and I can’t figure it out
nignag [31]

Answer:

The answer is A or the first option.

Explanation:

3 0
3 years ago
Do you need a contractor to install nest thermostat
Natalka [10]

Answer:

Sometimes yes, sometimes you can do it yourself

Explanation:

Installing a Nest thermostat can be done yourself without an electrician in most cases. Nest thermostats are designed to work in homes without a common (“C”) wire. However, there are rare cases a C wire or other power-supply accessory may be required. An electrician is recommended in these rare cases.

5 0
3 years ago
Other questions:
  • What is the time period of 1st generation of computer ???
    11·1 answer
  • Linux would be a good example of?
    6·1 answer
  • In the beginning of a presentation, it is important to:
    9·1 answer
  • A virus is a self-replicating program that produces its own code by attaching copies of it into other executable codes.
    7·1 answer
  • A computer is a multipurpose device that accepts input, processes data, stores data, and produces output, all according to a ser
    9·1 answer
  • About how long did it take to photograph Daguerre's photograph of the street?
    7·1 answer
  • What is the primary means by which attackers infect computers with these attacks? How do these attacks commonly occur?
    8·1 answer
  • Select the correct answer.<br> What do you understand by "exposition"?
    10·2 answers
  • IM a bit confused on what this is asking for exactly.
    14·1 answer
  • Web résumés allow you to include extra graphics and images that you would not include in a traditional résumé. please select the
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!