answer.
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]
2 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]2 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
The ingredient weights for making 1 yd (cyd) of concrete by assuming aggregates in SSD state are given below. The volume of air
Pachacha [2.7K]

Answer:

Explanation:

Ans) Given batch weight of each component :

Cement = 700 lb

Water = 315 lb

Coarse aggregate = 1575 lb

Fine aggregate = 1100 lb

Part 1) Amount of water = 328.5 lb

Amount of water is needed to be increased if the aggregates has absorption capacity, To maintain constant water cement ratio, the mixing water is increased because some of the water is absorbed by aggregates.

Amount of water absorbed = 328.5 lb - 315 lb = 13.5 lb

Total amount of aggregates = 1575 + 1100 = 2675 lb

=> % Absorption capacity = 13.5 x 100 / 2675 = 0.5 %

Hence, new amount of Coarse aggregate = (1 - 0.005) x 1575 lb = 1567.125 lb

New amount of fine aggregate = (1 - 0.005) x 1100 = 1094.5 lb

Since, water cement ratio is maintained constant , amount of cement remains unchanged

=> Volume of water = 328.5 / 62.4 = 5.26 ft3

=> Volume of cement = 700 / (3.15 x 62.4) = 3.56 ft3

=> Volume of coarse aggregate = 1567.125 / (2.4 x 62.4) = 10.46 ft3

=> Volume of fine aggregate = 1100 / (2.4 x 62.4) = 7.34 ft3

Volume of air = 2% = 0.02 x 27 = 0.54 ft3

Total concrete volume = 5.26 + 3.56 + 10.46 + 7.34 + 0.54 \approx 27 ft3 = 1 yd3

Hence, calculated amount of each component is correct

Part 2) We know, minus sign indicated that the aggregate will absorb some moisture from concrete, hence mixing water amount needed to be corrected .

=> Amount of water absorbed by coarse aggregate = 0.01 x 1567.125 lb = 15.67 lb

=> Amount of water absorbed by fine aggregate = 0.02 x 1094.50 lb = 21.89 lb

Total amount of water absorbed = 15.67 + 21.89 = 37.56 lb

To maintain same water cement ratio, amount of mixing water is needed to be increased

=> Corrected amount of mixing water = 328.5 lb + 37.56 lb = 366 lb

=> Corrected amount of coarse aggregate = (1 - 0.01) x 1567.125 = 1551.45 lb

=> Corrected amount of fine aggregate = (1 - 0.02) x 1094.5 = 1072.6 lb

Part 3) We know,

Unit weight = Sum of weight of each material / Total volume

=> Sum of weight = 366 + 700 + 1551.45 + 1072.6 = 3690.05 lb

Total volume = 1 yd3 or 27 ft3

=> Expected Unit Weight = 3690.05 lb / 27 ft3 = 136.67 lb/ft3

Also, Concrete Yield = Weight of all components / Unit weight of concrete

=> Yield = 3690.05 / 136.67 = 27 ft3 or 1 yd3

4 0
2 years ago
Universal Containers has a junction object called "Job Production Facility". With 2 master-detail relationships to the Job and P
alexdok [17]

Answer:

C. The user will not be able to see the junction object records or the field values.

Explanation:

For the profile of the user to give access permission such as create and read to the job without granting access permission to the production facility object, the value of the field or records of the junction object will not be seen by the user. This is one of the necessary criteria or principle for the universal container with a junction object.

3 0
2 years ago
If you have power steering and you are able to __________, you should have your vehicle checked out by a qualified technician.
svp [43]

Answer: drive

Explanation:

The best word that would fit this sentence is drive. A vehicle owner should know how to drive, and they can get their vehicle checked by a qualified technician. The best word that would fit this sentence is drive. If you have power steering and you are able to <u>drive</u>, you should have your vehicle checked by a qualified technician.

8 0
2 years ago
An electric field is expressed in rectangular coordinates by E = 6x2ax + 6y ay +4az V/m.Find:a) VMN if point M and N are specifi
Fittoniya [83]

Answer:

a.) -147V

b.) -120V

c.) 51V

Explanation:

a.) Equation for potential difference is the integral of the electrical field from a to b for the voltage V_ba = V(b)-V(a).

b.) The problem becomes easier to solve if you draw out the circuit. Since potential at Q is 0, then Q is at ground. So voltage across V_MQ is the same as potential at V_M.

c.) Same process as part b. Draw out the circuit and you'll see that the potential a point V_N is the same as the voltage across V_NP added with the 2V from the other box.

Honestly, these things take practice to get used to. It's really hard to explain this.

3 0
2 years ago
A cylindrical specimen of a brass alloy having a length of 60 mm (2.36 in.) must elongate only 10.8 mm (0.425 in.) when a tensil
Gemiola [76]

The radius of the specimen is 60 mm

<u>Explanation:</u>

Given-

Length, L = 60 mm

Elongated length, l = 10.8 mm

Load, F = 50,000 N

radius, r = ?

We are supposed to calculate the radius of a cylindrical brass specimen in order to produce an elongation of 10.8 mm when a load of 50,000 N is applied. It is necessary to compute the strain corresponding to this

elongation using Equation:

ε = Δl / l₀

ε = 10.8 / 60

ε = 0.18

We know,

σ = F / A

Where A = πr²

According to the stress-strain curve of brass alloy,

σ = 440 MPa

Thus,

sigma = 50,000 / \pi  (r)^2\\\\440 X 10^6 = \frac{50,000}{3.14 X (r)^2}\\\\r = 0.06m\\r = 60mm\\\\\\

Therefore, the radius of the specimen is 60 mm

3 0
2 years ago
Other questions:
  • Determine the amount of gamma and alpha phases in a 10-kg, 1060 steel casting as it is being cooled to the following temperature
    6·1 answer
  • A 0.2-m^3 rigid tank equipped with a pressure regulator contains steam at 2MPa and 320C. The steam in the tank is now heated. Th
    9·1 answer
  • Water is the working fluid in an ideal Rankine cycle. The condenser pressure is 8 kPa, and saturated vapor enters the turbine at
    10·1 answer
  • The basic barometer can be used to measure the height of a building. If the barometric readings at the top and the bottom of a b
    15·1 answer
  • The uniform 8–ft board is pushed down into the water so it makes an angle of θ = 30o with the water surface. If the cross sectio
    14·1 answer
  • Two resistors of values 7.0 and 15.0 Ω are connected in parallel. This combination in turn is hooked in series with a 3.8- Ω res
    7·1 answer
  • The mass fractions of a mixture of gases are 15 percent nitrogen, 5 percent helium, 60 percent methane, and 20 percent ethane. T
    9·1 answer
  • Suppose we store a relation R (x,y) in a grid file. Both attributes have a range of values from 0 to 1000. The partitions of thi
    12·1 answer
  • Anytime scaffolds are assembled or __________, a competent person must oversee the operation.
    15·2 answers
  • what is the advantage of decreasing the field current of a separately excited dc motor below its nominal value
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!