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
mylen [45]
3 years ago
10

Create a program named PaintingDemo that instantiates an array of eight Room objects and demonstrates the Room methods. The Room

constructor requires parameters for length, width, and height fields (all of type int); use a variety of values when constructing the objects. The Room class also contains the following fields: Area - The wall area of the Room (as an int) Gallons - The number of gallons of paint needed to paint the room (as an int)
Engineering
1 answer:
Serggg [28]3 years ago
3 0

Answer:

Explanation:

Code used will be like

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

namespace PaintingWall

{

class Room

{

public int length, width, height,Area,Gallons;

public Room(int l,int w,int h)

{

length = l;

width = w;

height = h;  

}

private int getLength()

{

return length;

}

private int getWidth()

{

return width;

}

private int getHeight()

{

return height;

}

public void WallAreaAndNumberGallons()

{

Area = getLength() * getHeight() * getWidth();

if (Area < 350)

{

Gallons = 1;

}

else if (Area > 350)

{

Gallons = 2;

}    

Console.WriteLine ("The area of the Room is " + Area);

Console.WriteLine("The number of gallons paint needed to paint the Room is " + Gallons);

}

 

}

class PaintingDemo

{

static void Main(string[] args)

{

int l, w, h;

Room[] r = new Room[8];

for (int i = 0; i <= 7; i++)

{

Console.WriteLine("Room "+(i+1));

Console.Write("Enter Length : ");

l = Convert.ToInt32(Console.ReadLine() );

Console.Write("Enter Width : ");

w = Convert.ToInt32(Console.ReadLine());

Console.Write("Enter Height : ");

h= Convert.ToInt32(Console.ReadLine());

r[i] = new Room(l,w,h);

Console.WriteLine();

}

for (int i = 0; i <= 7; i++)

{

Console.WriteLine("Room " + (i + 1));

r[i].WallAreaAndNumberGallons();

}

Console.ReadKey();  

}

}

}

You might be interested in
Select the correct answer.
olya-2409 [2.1K]

Answer:

screw is the answer of the question

6 0
3 years ago
Read 2 more answers
An array of electronic chips is mounted within a sealedrectangular enclosure, and colling is implemented by attaching analuminum
Licemer1 [7]

Answer:

Base temperature is 46.23 °C

Explanation:

I've attached explanations

6 0
3 years ago
A silicon diode has a saturation current of 6 nA at 25 degrees Celcius. What is the saturation current at 100 degrees Celsius?
Illusion [34]

Answer:

0.0659 A

Explanation:

Given that :

I_{0}  =  6nA ( saturation current )

at 25°c = 300 k ( room temperature )

n = 2  for silicon diode

Determine the saturation current at 100 degrees = 373 k

Diode equation at room temperature = I = Io \frac{V}{e^{0.025*n} }

next we have to determine the value of V at 373 k

q / kT = (1.6 * 10^-19) / (1.38 * 10^-23 * 373) = 31.08 V^-1

Given that I is constant

Io = \frac{e^{0.025*2} }{31.08} =  0.0659 A

3 0
3 years ago
What is the sun's degree angle in the sky in summer and in winter?
Vladimir [108]

Answer:

At the time of the summer or winter solstices, the Sun is 23.44° degrees above or below the horizon, respectively, irrespective of time of day.

Explanation:

6 0
2 years ago
Design circuits that demonstrate all of the principles listed below. Set up the circuits and take measurements to show that the
Nata [24]

<u>Explanation</u>:

For series

\Delta V=V_{1}+V_{2}+\ldots+V_{n}=I R_{1}+I R_{2}+\ldots+I R_{n}(\text {voltages add to the batter } y)

\(I=I_{1}=I_{2}=I_{n}\) (current is the same)

V=I R(\text {voltage is directly proportional to } R)

R_{e q}=R_{1}+R_{2}+\ldots+R_{n} \quad \text { (resistance increase) }

For parallel

\Delta V=\Delta V_{1}=\Delta V_{2}=\Delta V_{n} \quad(\text { same voltage })

I=I_{1}+I_{2}+\ldots+I_{n}(\text {current adds})

\(I=\frac{\Delta V}{R_{e q}} \quad(R \text { inversal } y \text { proportional to } I)\)

\frac{1}{R_{e q}}=\frac{1}{R_{1}}+\frac{1}{R_{2}}+\ldots+\frac{1}{R_{n}}

3 0
3 years ago
Other questions:
  • A certain working substance receives 100 Btu reversibly as heat at a temperature of 1000℉ from an energy source at 3600°R. Refer
    13·1 answer
  • Different types of steels contain different elements that alter the characteristics of the steel. For each of the following elem
    6·1 answer
  • A mass weighing 22 lb stretches a spring 4.5 in. The mass is also attached to a damper with Y coefficient . Determine the value
    12·1 answer
  • At what stage of development is an engineering team the most productive?
    6·2 answers
  • An automobile engine consumes fuel at a rate of 22 L/h and delivers 85 kW of power to the wheels. If the fuel has a heating valu
    8·2 answers
  • A civil engineer is analyzing the compressive strength of concrete. The compressive strength is approximately normal distributed
    7·1 answer
  • using the two transistor analogy to explain what happens when an SCR is supplied with some gate current.​
    15·1 answer
  • Air is compressed steadily from 100kPa and 20oC to 1MPa by an adiabatic compressor. If the mass flow rate of the air is 1kg/s an
    12·1 answer
  • What are the most used electronic tools for electronic works?​
    13·1 answer
  • When you approach an uncontrolled intersection, you should treat it as though which sign is present?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!