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
The arrow next to all programs indicates
myrzilka [38]

Answer:

the presence of a submenu

Explanation:

The options are:

  • this item cannot be selected
  • that this was the most recently used item
  • the importance of the item
  • the presence of a submenu

And the correct option is certainly the fourth option, and which is the presence of the submenu. The arrow next to all the programs certainly indicates that there is a submenu, and hence, the fourth option is the correct option here.

6 0
3 years ago
Juhfvehrfwhedfhwkefhkujhiuyuiyuiyiyh
maw [93]

Answer:

blah

blah

blah..⁉️

Explanation:

juhfvehrfwhedfhwkefhkujhiuyuiyuiyiyh

⁉️

8 0
3 years ago
Which of the following helps create a positive community?
Lera25 [3.4K]

Answer: D.) all of the above

Explanation: By doing all three of these it makes almost everyone in the community is happier and more positive which is better than the bully's & people who don't speak up feel less entitled, it achieves the goal.

5 0
3 years ago
What kind of cable would you use to connect a network printer to the soho router if you were using a wired connection to the net
Ksivusya [100]

Answer:

A) Ethernet

To Connect the Printer to a Wired (Ethernet) Network

<h3>what is the process of connecting a network printer to the SOHO router?</h3>
  • Connect one end of an Ethernet cable to the Ethernet port on the back of the printer, then connect the other end of the cable to a correctly configured network port, switch or router port.
  • Connect the Printer to a Router.

To learn more about ethernet, refer

to brainly.com/question/24621985

#SPJ4

4 0
2 years ago
I need help figuring out 2 pictures with topics that I can put on a magazine about the serengeti. This is something I'm doing fo
Usimov [2.4K]

Answer:

how about lions, trees, or zebras

Explanation:

i looked it up

4 0
3 years ago
Read 2 more answers
Other questions:
  • By apply styles, _____________ formats are being applied each time.
    6·1 answer
  • Ruth knows the name of a presentation file and the folder it's in, but there are many files in that folder. How can Ruth quickly
    8·1 answer
  • Your smartphone, digital camera, and printer are all part of a network in your workspace. What type of network is likely in use
    7·1 answer
  • Name two common methods for performing dependency injection.
    15·1 answer
  • This chapter uses the class rectangleType to illustate how to overload the operators +, *, ==, !=, &gt;&gt;, and &lt;&lt;. In th
    15·1 answer
  • How to solve 3(x - 2) = 9x<br><img src="https://tex.z-dn.net/?f=3%28x%20-%202%29%20%3D%209x" id="TexFormula1" title="3(x - 2) =
    14·1 answer
  • What are parrallel lines​
    6·1 answer
  • This is for career exploration, I need help please! &lt;3 HELPPPP
    8·2 answers
  • Some elementary particles are positively or negatively
    11·2 answers
  • A related database stores data in the form of______
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!