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
Re armature of a 4 pole DC generator is required to generate an emf of 520v on open circuit when revolving at a speed of 660rpm.
bija089 [108]

Since the armature is wave wound, the magnetic flux per pole is 0.0274 Weber.

<u>Given the following data:</u>

  • Emf = 520 Volts
  • Speed = 660 r.p.m
  • Number of armature conductors = 144 slots
  • Number of poles = 4 poles
  • Number of parallel paths = 2

To find the magnetic flux per pole:

Mathematically, the emf generated by a DC generator is given by the formula;

E = \frac{\theta ZN}{60} × \frac{P}{A}

<u>Where:</u>

  • E is the electromotive force in the DC generator.
  • Z is the total number of armature conductors.
  • N is the speed or armature rotation in r.p.m.
  • P is the number of poles.
  • A is the number of parallel paths in armature.
  • Ф is the magnetic flux.

First of all, we would determine the total number of armature conductors:

Z = 144 × 2 × 3

Z = 864

Substituting the given parameters into the formula, we have;

520 = \frac{\theta (864)(660)}{60} × \frac{4}{2}

520 = \theta (864)(11) × 2

520 = 19008 \theta \\\\\Theta = \frac{520}{19008}

<em>Magnetic flux </em><em>=</em><em> 0.0274 Weber.</em>

Therefore, the magnetic flux per pole is 0.0274 Weber.

Read more: brainly.com/question/15449812?referrer=searchResults

5 0
3 years ago
A liquid jet vj of diameter dj strikes a fixed cone and deflects back as a conical sheet at the same velocity. find the cone ang
dmitriy555 [2]

Answer:

lol i cant real it sorry

Explanation:

7 0
2 years ago
Can you use isentropic efficiency for a non-adiabatic compressor?
vodomira [7]
Mark brainliest please!

Isothermal work will be less than the adiabatic work for any given compression ratio and set of suction conditions. The ratio of isothermal work to the actual work is the isothermal efficiency. Isothermal paths are not typically used in most industrial compressor calculations.

Compressors

Compressors are used to move gases and vapors in situations where large pressure differences are necessary.

Types of Compressor

Compressors are classified by the way they work: dynamic (centrifugal and axial) or reciprocating. Dynamic compressors use a set of rotating blades to add velocity and pressure to fluid. They operate at high speeds and are driven by steam or gas turbines or electric motors. They tend to be smaller and lighter for a given service than reciprocating machines, and hence have lower costs.

Reciprocating compressors use pistons to push gas to a higher pressure. They are common in natural gas gathering and transmission systems, but are less common in process applications. Reciprocating compressors may be used when very large pressure differences must be achieved; however, since they produce a pulsating flow, they may need to have a receiver vessel to dampen the pulses.

The compression ratio, pout over pin, is a key parameter in understanding compressors and blowers. When the compression ratio is below 4 or so, a blower is usually adequate. Higher ratios require a compressor, or multiple compressor stages, be used.

When the pressure of a gas is increased in an adiabatic system, the temperature of the fluid must rise. Since the temperature change is accompanied by a change in the specific volume, the work necessary to compress a unit of fluid also changes. Consequently, many compressors must be accompanied by cooling to reduce the consequences of the adiabatic temperature rise. The coolant may flow through a jacket which surrounds the housing with liquid coolant. When multiple stage compressors are used, intercooler heat exchangers are often used between the stages.

Dynamic Compressors

Gas enters a centrifugal or axial compressor through a suction nozzle and is directed into the first-stage impeller by a set of guide vanes. The blades push the gas forward and into a diffuser section where the gas velocity is slowed and the kinetic energy transferred from the blades is converted to pressure. In a multistage compressor, the gas encounters another set of guide vanes and the compression step is repeated. If necessary, the gas may pass through a cooling loop between stages.

Compressor Work

To evaluate the work requirements of a compressor, start with the mechanical energy balance. In most compressors, kinetic and potential energy changes are small, so velocity and static head terms may be neglected. As with pumps, friction can be lumped into the work term by using an efficiency. Unlike pumps, the fluid cannot be treated as incompressible, so a differential equation is required:

Compressor Work
Evaluation of the integral requires that the compression path be known - - is it adiabatic, isothermal, or polytropic?
uncooled units -- adiabatic, isentropic compression
complete cooling during compression -- isothermal compression
large compressors or incomplete cooling -- polytropic compression
Before calculating a compressor cycle, gas properties (heat capacity ratio, compressibility, molecular weight, etc.) must be determined for the fluid to be compressed. For mixtures, use an appropriate weighted mean value for the specific heats and molecular weight.

Adiabatic, Isentropic Compression

If there is no heat transfer to or from the gas being compressed, the porocess is adiabatic and isentropic. From thermodynamics and the study of compressible flow, you are supposed to recall that an ideal gas compression path depends on:

Adiabatic Path
This can be rearranged to solve for density in terms of one known pressure and substituted into the work equation, which then can be integrated.
Adiabatic Work
The ratio of the isentropic work to the actual work is called the adiabatic efficiency (or isentropic efficiency). The outlet temperature may be calculated from
Adiabatic Temperature Change
Power is found by multiplying the work by the mass flow rate and adjusting for the units and efficiency.
Isothermal Compression

If heat is removed from the gas during compression, an isothermal compression cycle may be achieved. In this case, the work may be calculated from:

http://facstaff.cbu.edu/rprice/lectures/compress.html
4 0
3 years ago
In C++ the declaration of floating point variables starts with the type name float or double, followed by the name of the variab
zubka84 [21]

Answer:

The given grammar is :

S = T V ;

V = C X

X = , V | ε

T = float | double

C = z | w

1.

Nullable variables are the variables which generate ε ( epsilon ) after one or more steps.

From the given grammar,

Nullable variable is X as it generates ε ( epsilon ) in the production rule : X -> ε.

No other variables generate variable X or ε.

So, only variable X is nullable.

2.

First of nullable variable X is First (X ) = , and ε (epsilon).

L.H.S.

The first of other varibles are :

First (S) = {float, double }

First (T) = {float, double }

First (V) = {z, w}

First (C) = {z, w}

R.H.S.

First (T V ; ) = {float, double }

First ( C X ) = {z, w}

First (, V) = ,

First ( ε ) = ε

First (float) = float

First (double) = double

First (z) = z

First (w) = w

3.

Follow of nullable variable X is Follow (V).

Follow (S) = $

Follow (T) = {z, w}

Follow (V) = ;

Follow (X) = Follow (V) = ;

Follow (C) = , and ;

Explanation:

4 0
3 years ago
An automobile weighing 2500 lbf increases its gravitational potential energy by a magnitude of 2.25 × 104 Btu in going from an e
Mila [183]

Answer:

The elevation at the high point of the road is 12186.5 in ft.

Explanation:

The automobile weight is 2500 lbf.

The automobile increases its gravitational potential energy in 2.25 * 10^4 BTU. It means the mobile has increased its elevation.

The initial elevation is of 5183 ft.  

The first step is to convert Btu of potential energy to adequate units to work with data previously presented.

British Thermal Unit - 1 BTU = 778.17  lbf*ft

2.25 * 10^4 BTU (\frac{778.17 lbf*ft}{1BTU} ) = 1.75 * 10^7 lbf * ft

Now we have the gravitational potential energy in lbf*ft. Weight of the mobile is in lbf and the elevation is in ft. We can evaluate the expression for gravitational potential energy as follows:  

Ep = m*g*(h_2 - h_1)\\ W = m*g  

Where m is the mass of the automobile, g is the gravity, W is the weight of the automobile showed in the problem.  

h_2 is the final elevation and h_1 is the initial elevation.

Replacing W in the Ep equation

Ep = W*(h_2 -h_1)\\(h_2 -h_1) = \frac{Ep}{W} \\h_2 = h_1 + \frac{Ep}{W}\\\\

Finally, the next step is to replace the variables of the problem.  

h_2 = 5183 ft + \frac{1.75 * 10^7 lbf*ft}{2500 lbf}\\h_2 = 5183 ft + 70003.5 ft\\h_2 = 12186.5 ft

The elevation at the high point of the road is 12186.5 in ft.  

3 0
3 years ago
Other questions:
  • How to solve this question
    11·1 answer
  • A six-lane multilane highway (three lanes in each direction) has a peak-hour factor of 0.90, 11-ft lanes with a 4-ft right-side
    11·1 answer
  • Create a project named CarDealer that contains a Form for an automobile dealer. Include options for at least three car models. A
    14·1 answer
  • If you owned a business, what are some of the ways you could follow green computing recommendations with regards to recycling an
    13·1 answer
  • Carbon dioxide at a temperature of 0oC and a pressure of 600 kPa (abs) flows through a horizontal 40-mm- diameter pipe with an a
    10·1 answer
  • Random question, does anyone here use Lego, do not answer unless that is a yes
    15·2 answers
  • Anything you want to do in Hootsuite can be found in the ________, with the main workspace in the _________?
    15·1 answer
  • 1. A hydro facility operates with an elevation difference of 50 m and a flow rate of 500 m3/s. If the rotational speed is 90 RPM
    12·1 answer
  • Which symbol should be used for the given scenario?
    11·1 answer
  • 'Energy' has the potential to:
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!