C++ PROGRAM! Goals:
Learn to use inheritance to create new classes.
Learn to use polymorphism to store different types of objects in the same array.
Requirements:
Write a program that implements four classes: NPC, Flying, Walking, and Generic for a fantasy roleplaying game. Each class should have the following attributes and methods:
NPC -a parent class that defines methods and an attribute common to all non-player characters (npc) in the game.
a private string variable named name, for storing the name of the npc.
a default constructor for setting name to "placeholder".
an overloaded constructor that sets name to a string argument passed to it.
setName - a mutator for updating the name attribute
getName - an accessor for returning the npc name
printStats - a pure virtual function that will be overridden by each NPC subclass.
Flying - a subclass of NPC that defines a flying npc in the game
a private int variable named flightSpeed for tracking the speed of the npc.
a default constructor for setting flightSpeed to 0 and name to "Flying" using setName.
setFlightSpeed - a mutator that accepts an integer as it's only argument and updates flightSpeed.
getFlightSpeed - an accessor that returns the flightSpeed.
printStats - prints the name and current flightspeed to the screen as well as the string "Flying Monster".
Walking - a subclass of NPC that defines a walking npc in the game
a private int variable named walkSpeed for tracking the speed of the npc.
a default constructor for setting walkSpeed to 0 and name to "Walking" using setName.
setWalkSpeed - a mutator that accepts an integer as it's only argument and updates walkSpeed.
getWalkSpeed - an accessor that returns the walkSpeed.
printStats - prints the name and current walkSpeed to the screen as well as the string "Walking Monster".
Generic - a subclass of NPC that defines a "generic" npc in the game
a private int variable named stat for tracking some undetermined value.
a default constructor for setting stat to 0 and name to "Generic" using setName.
an overloaded constructor that accepts a string and an integer as it's only arguments. Sets stat to the integer argument and name to the string argument.
setStat - a mutator that accepts an integer as it's only argument and updates stat.
getStat - an accessor that returns the stat.
printStats - prints the name and current stat to the screen as well as the string "Generic Monster"
Output should look something like this:
Name: Flying Flight Speed: 12 Flying Monster. Name: Walking Walking Speed: 8 Walking Monster. Name: Tom Bombadil Generic Stat: 9001 Generic Monster.

Answers

Answer 1

Here's an example implementation of the program in C++:

cpp

Copy code

#include <iostream>

#include <string>

using namespace std;

class NPC {

private:

   string name;

public:

   NPC() {

       name = "placeholder";

   }

   

   NPC(string npcName) {

       name = npcName;

   }

   

   void setName(string npcName) {

       name = npcName;

   }

   

   string getName() {

       return name;

   }

   

   virtual void printStats() = 0;

};

class Flying : public NPC {

private:

   int flightSpeed;

public:

   Flying() : NPC("Flying") {

       flightSpeed = 0;

   }

   

   void setFlightSpeed(int speed) {

       flightSpeed = speed;

   }

   

   int getFlightSpeed() {

       return flightSpeed;

   }

   

   void printStats() {

       cout << "Name: " << getName() << ", Flight Speed: " << flightSpeed << ", Flying Monster." << endl;

   }

};

class Walking : public NPC {

private:

   int walkSpeed;

public:

   Walking() : NPC("Walking") {

       walkSpeed = 0;

   }

   

   void setWalkSpeed(int speed) {

       walkSpeed = speed;

   }

   

   int getWalkSpeed() {

       return walkSpeed;

   }

   

   void printStats() {

       cout << "Name: " << getName() << ", Walk Speed: " << walkSpeed << ", Walking Monster." << endl;

   }

};

class Generic : public NPC {

private:

   int stat;

public:

   Generic() : NPC("Generic") {

       stat = 0;

   }

   

   Generic(string npcName, int npcStat) : NPC(npcName) {

       stat = npcStat;

   }

   

   void setStat(int npcStat) {

       stat = npcStat;

   }

   

   int getStat() {

       return stat;

   }

   

   void printStats() {

       cout << "Name: " << getName() << ", Stat: " << stat << ", Generic Monster." << endl;

   }

};

int main() {

   Flying flyingNPC;

   flyingNPC.setFlightSpeed(12);

   flyingNPC.printStats();

   

   Walking walkingNPC;

   walkingNPC.setWalkSpeed(8);

   walkingNPC.printStats();

   

   Generic genericNPC("Tom Bombadil", 9001);

   genericNPC.printStats();

   

   return 0;

}

Explanation:

The program defines four classes: NPC, Flying, Walking, and Generic. NPC is an abstract base class with a pure virtual function printStats().

The Flying, Walking, and Generic classes inherit from NPC using the public access specifier.

Each class has its own attributes and methods as specified in the requirements.

The printStats() function is overridden in each subclass to provide the desired output.

In the main() function, objects of each subclass are created and their attributes are set using the respective mutator methods.

Finally, the printStats() method is called on each object to display the information.

The output will be:

yaml

Copy code

Name: Flying, Flight Speed: 12, Flying Monster.

Name: Walking, Walk Speed: 8, Walking Monster.

Name: Tom Bombadil, Stat: 9001, Generic Monster.

Each line corresponds to the information of an NPC object, as specified in the program.

Learn more about implementation here:

https://brainly.com/question/32181414

#SPJ11


Related Questions

g Potassium iodide solution is mixed with lead (II) nitrate solution. A yellow solid forms. If all compounds with nitrate in the formula are soluble what is the formula for the solid

Answers

The  formula for the yellow solid formed when potassium iodide solution is mixed with lead (II) nitrate solution is PbI2.

When potassium iodide (KI) is mixed with lead (II) nitrate (Pb(NO3)2), a double displacement reaction occurs. The potassium cation (K+) and the lead (II) cation (Pb2+) switch places to form potassium nitrate (KNO3) and lead (II) iodide (PbI2). Since all compounds with nitrate in the formula are soluble, the potassium nitrate remains in solution while the lead (II) iodide precipitates out as a yellow solid.


Since all compounds with nitrate (NO3-) in the formula are soluble, KNO3 will remain dissolved in the solution. On the other hand, the yellow solid that forms is lead (II) iodide (PbI2), which has limited solubility in water and precipitates out as the solid product.

To know more about potassium visit:-

https://brainly.com/question/29445176

#SPJ11

Installation a2 An insulated rigid tank initially contains 1.4-kg saturated liquid
water and water vapor at 200°C. At this state, 25 percent of the
volume is occupied by liquid water and the rest by vapor. Now an
electric resistor placed in the tank is turned on, and the tank is
observed to contain saturated water vapor after 20 min. Determine
(a) the volume of the tank, (b) the final temperature, and (c) the
electric power rating of the resistor
nd demo of reaper in Mahindra Yuvo 575 DI tractor

Answers

Answer:

Explanation:

It appears that you are trying to solve a problem involving an insulated rigid tank containing saturated liquid water and water vapor. To determine the volume of the tank, you will need to know the mass of the liquid water and the mass of the water vapor. The mass of the liquid water can be calculated by multiplying the mass of the water and vapor mixture by the fraction of the mixture that is liquid water (1.4 kg * 0.25 = 0.35 kg). The mass of the water vapor can be calculated by subtracting the mass of the liquid water from the total mass of the mixture (1.4 kg - 0.35 kg = 1.05 kg).

To determine the final temperature of the tank, you will need to know the amount of heat added to the tank by the electric resistor and the specific heat capacity of the water and water vapor mixture. The specific heat capacity is a measure of the amount of heat required to raise the temperature of a substance by a certain amount. The specific heat capacity of water is 4.186 J/g°C, and the specific heat capacity of water vapor is 2.080 J/g°C.

To determine the electric power rating of the resistor, you will need to know the amount of heat added to the tank by the resistor and the time over which the heat was added. The power rating of the resistor is equal to the amount of heat added to the tank divided by the time over which the heat was added.

I hope this helps clarify the problem and provide some guidance on how to solve it. If you have any further questions or need additional help, please don't hesitate to ask.

A single crystal of a metal that has the FCC crystal structure is oriented such that a tensile stress is applied parallel to the [100] direction. If the critical resolved shear stress for this material is 2.00 MPa, calculate the magnitude of applied stress necessary to cause slip to occur on the (111) plane in the direction.

Answers

Answer:

Explanation:

From the given information:

The equation for applied stress can be expressed as:

\(\sigma_{app} = \dfrac{\tau_{CRSS}}{cos \phi \ cos \lambda}\)

where;

\(\phi\) = angle between the applied stress [100] and [111]

To determine the \(\phi\) and \(\lambda\) for the system

Using the equation:

\(\phi= cos^{-1}\Big [\dfrac{l_1l_2+m_1m_2+n_1n_2}{\sqrt{(l_1^2+m_1^2+n_1^2)(l_2^2+m_2^2+n_2^2)}}\Big]\)

for [100]

\(l_1 = 1, m_1 = 0, n_1 = 0\)

for [111]

\(l_1 = 1 , m_1 = 1, n_1 = 1\)

Thus;

\(\phi= cos^{-1}\Big [\dfrac{1*1+0*1+0*1}{\sqrt{(1^2+0^2+0^2)(1^2+1^2+1^2)}}\Big]\)

\(\phi= cos^{-1}\Big [\dfrac{1}{\sqrt{(3)}}\Big]\)

\(\phi= 54.74^0\)

To determine  \(\lambda\)  for \([1 \overline 1 0]\)

where;

for [100]

\(l_1 = 1, m_1 = 0, n_1 = 0\)

for \([1 \overline 1 0]\)

\(l_1 = 1 , m_1 = -1, n_1 = 0\)

Thus;

\(\lambda= cos^{-1}\Big [\dfrac{1*1+0*1+0*0}{\sqrt{(1^2+0^2+0^2)(1^2+(-1)^2+0^2)}}\Big]\)

\(\phi= cos^{-1}\Big [\dfrac{1}{\sqrt{(2)}}\Big]\)

\(\phi= 45^0\)

Thus, the magnitude of the applied stress can be computed as:

\(\sigma_{app} = \dfrac{\tau_{CRSS}}{cos \phi \ cos \lambda }\)

\(\sigma_{app} = \dfrac{2.00}{cos (54.74) \ cos (45) }\)

\(\mathbf{\sigma_{app} =4.89 \ MPa}\)

According to each of the Utilitarian and Capabilities approacheswhat reasons should motivate an engineer to attend to the needs of the visually impaired?

Answers

Answer:

According to the Utilitarian approach, an engineer should attend to the needs of the visually impaired because doing so would result in the greatest overall happiness and well-being for the greatest number of people. By designing products and systems that are accessible and usable by the visually impaired, engineers can improve the quality of life for a significant portion of the population, which would result in increased happiness and well-being.

According to the Capabilities approach, an engineer should attend to the needs of the visually impaired because doing so would help to promote their capabilities and enable them to live fulfilling lives. By designing products and systems that are accessible and usable by the visually impaired, engineers can help to ensure that these individuals are not restricted in their ability to participate fully in society and to pursue their goals and aspirations. This would enable the visually impaired to develop and exercise their capabilities, which would contribute to their overall well-being and flourishing.

Explanation:

A circuit has two resistors in parallel, each resistor is 6 ohms. This circuit is connected to a single resistor of 6 ohms, to form a series-parallel circuit. What is the total resistance of the circuit?

Answers

The tatal resistance of the series-parallel circuit with two resistor connected in parallel which combination is connected in series to a single resistor is 9 ohms.

What is a resistance?

This can be defined as the opposition to current flow in a circuit.

To calculate the total resistance, first we need to find the total resistance of the parallel resistor.

For parallel,

R' = (R₁R₂)/(R₁+R₂)............Equation 1

Where:

R' = Total resistance of the parallel resistor.

From the question,

Given:

R₁ = 6 ohmsR₂ = 6 ohms

Substitute these values into equation 1

R' = (6×6)(6+6)R' = 3 ohms.

Finally, we combine the effective parallel resistance in series to the single resistance to the the total resistance of the circuit.

Rt = R'+R₃.................. Equation 2

Where:

Rt = Total resistance of the circuit.

From the question,

R' = 3 ohmsR₃ = 6 ohms

Substitute these values into equation 2

Rt = 3+6Rt = 9 ohms.

Hence, the total resistance of the circuit is 9 ohms.

Learn more about resistance here: https://brainly.com/question/28135236

#SPJ1

What are minerals made of?
NO LINKS PLEASE
A. Different substances
B. Liquid substances
C. Two or more substances
D. The same substance throughout

Answers

Answer:

the answer I know is A. different substances. hope this helps :).

Explanation:

just always study hard and God bless.

Cold water at 20 degrees C and 5000 kg/hr is to be heated by hot water supplied at 80 degrees C and 10,000 kg/hr. You select from a manufacturer's catalog a shell-and-tube heat exchanger (one shell with two tube passes) having a UA value of 11,600 W/K. Determine the hot water outlet temperature.

Answers

Answer:

59°C

Explanation:

Given that, Cc = McCp,c = 5000 /3600 × 4178 = 5803.2(W/K)

and Ch = MhCp,h = 10000 / 3600 × 4188 = 11634.3(W/K)

Therefore the minimum and maximum heat capacities are:

Cmin = Cc = 5803.2(W/K)

Cmax = Ch = 11634.3(W/K)

The capacity ratio is:

Cr = Cmin / Cmax = 0.499 = 0.5

The maximum possible heat transfer rate is:

Qmax = Cmin (Th,i - Tc,i) = 5803.2 (80 - 20) = 348192(W)

And the number of transfer units is: NTU = UA / Cmin = 11600 / 5803.2 = 1.99

Given that from the appropriate graph in the handouts we can read  = 0.7. So the actual heat transfer rate is: Qact = Qmax = 0.7 × 348192 = 243734.4(W)

Hence, the outlet hot temperature is: Th,o = Th,i - Qact / Ch = 59°C

1. Asbestos can be dangerous but is not a known carcinogen.
A) O True
B) O False

Answers

Asbestos may cause cancer by inhalation. Moreover, asbestos is also known to cause different respiratory diseases (especially asbestosis) by affecting the mucosa of the bronchi.

The statement "Asbestos can be dangerous but is not a known carcinogen" is FALSE.

Asbestos is a group of materials that were widely used in building constructions until 1990.

Asbestos is a toxic substance that may cause mesothelioma and lung cancer.

Mesothelioma is a type of cancer that develops on the outer surface that covers different internal organs.

Moreover, asbestosis is a chronic disease in the lungs caused by long-term exposure to asbestos.

Learn more in:

https://brainly.com/question/8853025?referrer=searchResults

Answer:

False

Explanation:

what is the speed of a spur gear with 42 teeth driven by a pinion gear with 14 teeth turning 420 rpm?

Answers

The formula for calculating gear speed is: (rpm of the driving gear * number of teeth on the driving gear) / number of teeth on the driven gear.

What is the formula for calculating gear speed?

To calculate the speed of the spur gear, we can use the gear ratio formula, which is gear ratio = number of teeth on driven gear (spur gear) / number of teeth on driving gear (pinion gear).

In this case, the gear ratio is 42/14 = 3.

Next, we can use the formula for gear speed, which is gear speed = pinion gear speed / gear ratio.

Since the pinion gear is turning at 420 rpm, the gear speed of the spur gear is:

gear speed = 420 rpm / 3 = 140 rpm.

Therefore, the speed of the spur gear with 42 teeth driven by a pinion gear with 14 teeth turning at 420 rpm is 140 rpm.

Learn more about gear speed

brainly.com/question/12761665

#SPJ11

which one of these reduce fraction?

Answers

How is I’m supposed to answer the question

If your engine fails (completely shuts down) what should you do with your brake?

Answers

Answer:

take your foot off of the accelorator. do not brake and let the vehicle coast until it stops. put on your hazard lights as well

Explanation:


Where's an inductor most likely to be found in a power-supply circuit?

Answers

The main use for inductors as energy storage is in switch-mode power supplies, like the power supply in a PC. In the simpler, non-isolated switch-mode power supplies, a single inductor is used in place of a transformer and an energy storage component.

How would you expect an increase in the austenite grain size to affect the hardenability of a steel alloy? Why?

Answers

Answer:

The hardenability increases with increasing austenite grain size, because the grain boundary area is decreasing. This means that the sites for the nucleation of ferrite and pearlite are being reduced in number, with the result that these transformations are slowed down, and the hardenability is therefore increased.

In a high-quality coaxial cable, the power drops by a factor of 10 approximately every 5 km. If the original signal power is 0.25 W (=2.5 x 10-1), how far will a signal be transmitted before the power is attenuated to 25 μW? As part of your answer, include a Table showing the signal power vs. distance in 5 km intervals. If optical fibre is used instead of the coaxial cable, briefly explain how you would expect the above calculated distance value to change. You are not required to include another Table.

Answers

Answer:

20 km for 40 dB loss80 km for 40 dB loss, or 10 dB loss for 20 km

Explanation:

Here's your table of (distance, power level):

  (0 km, 250 mW), (5 km, 25 mW), (10 km, 2.5 mW),

  (15 km, 250 μW), (20 km, 25 μW)

The signal can be transmitted 20 km before being attenuated to 25 μW.

__

Reportedly, the loss in fiber optic cable is about 0.5 dB/km. This compares to 10 dB/5 km = 2 dB/km for the coaxial cable. Loss in dB/km is a factor of 4 less for fiber optic cable, so the distance for the same loss would be multiplied by 4.

A new approval process is being adapted by Ursa Major Solar. After an opportunity has been approved, the contract is sent to the customer for signature as the final step in that process.Hon can the administrator implement this functionality?

Answers

install an app :] i think lol

An isolation transformer whose main purpose is to reduce voltage spikes will have a turns ratio of?

Answers

Answer:

An isolation transformer whose main purpose is to reduce voltage spikes will have a turns ratio of 1 to 1.

This is due to the windings input and output having the same waveform and amplitude.

built sod houses used dry farming techniques used barbed wire fences burned cow and buffalo chips for fuel windmills pumped water steel plow used for tough soil what would be the best title for the box above? responses

Answers

farmers adapted to the environment on the huge plains is the right response (option C). built sod homes, employed dry agricultural methods, erected barbed wire fences, and utilized cow.

Windmills sold water, and steel was used to make difficult oil. How Farmers Adapted to Conditions on the Great Plains might be the ideal heading for this paragraph. We are discussing how farmers changed their way of life as the West was opened up. West of the Mississippi River is where you'll find the Great Plains. It is a vast, flat, dusty, environment area that significantly impacted the farmers who lived there, forcing them to innovate and build a variety of items in order to survive or live in better conditions, notably with reference to farming methods.

Learn more about Windmills here

https://brainly.com/question/2482509

#SPJ4

The complete question is-

Built sod houses , used dry farming techniques , used barbed wire fences , burned cow and buffalo chips for fuel , windmills pimped water , steel pow used for tough oil . What would be the best title for these ? A. Methods used by forty niners to stake claims. b. Sources of conflict between ranchers and farmers. C. How farmers adapted to conditions on the great plains. D. How american indians and western farmers cooperated

For the following specifications, design a linear phase-blocking FIR filter using the Hamming window-design technique. Then find the impulse response and the magnitude response.
Lower and upper low-band edge frequencies:

0.47, 0.67, A, = 50dB

Lower and upper passband edge frequencies:

0.3, 0.7, R₂ = 0.2dB

Answers

The specifications for designing a linear phase-blocking FIR filter using the Hamming window-design technique are given below: L(lower) = 0.3, L(upper) = 0.7, R₂ = 0.2dB, F(lower) = 0.47, F(upper) = 0.67, A = 50dB.

Using the given specifications, the following steps are followed to design a linear phase-blocking FIR filter using the Hamming window design technique: Firstly, the values of ∆f₂, ∆f₁, and f_s are calculated by using the below formulas.

∆f₂ = L(upper) - L(lower) = 0.7 - 0.3 = 0.4∆f₁ = F(upper) - F(lower) = 0.67 - 0.47 = 0.2f_s = 2 × max(L(upper), F(upper)) = 2 × 0.7 = 1.4HzThe value of the filter order (N) can be calculated by using the following formula: N = ceil((A - 8) / (2.285 * ∆f₁)) + 1 = ceil((50 - 8) / (2.285 × 0.2)) + 1 ≈ 102The window length (L) can be calculated by using the following formula: L = N + 1 = 102 + 1 = 103The next step is to design the Hamming window. The following formula is used to design the Hamming window.

h(n) = 0.54 - 0.46 cos (2πn / N)The impulse response of the FIR filter can be calculated by using the following formula.h(n) = sin(2πL(n-N/2))/π(n-N/2)) * w(n), where w(n) is the designed Hamming window and n = 0, 1, …, N.

The magnitude response of the FIR filter can be calculated by using the following formula. H(w) = |H(w)| = ∑h(n) e^(-jwn)The magnitude response plot is shown below. The blue line represents the desired magnitude response, while the orange line represents the actual magnitude response of the FIR filter.

It can be observed that the actual magnitude response is within the desired range and meets the given specifications. Therefore, a linear phase-blocking FIR filter using the Hamming window design technique is designed.

To know more about phase-blocking

https://brainly.com/question/2141988

#SPJ11

xpress the negative value -22 as a 2's complement integer, using eight bits. Repeat it for 16 bits and 32 bits. What does this illustrate with respect to the properties of sign extension as they pertain to 2's complement representation?  8 bit The 8-bit binary representation of 22 is 00010110. So, -22 in 2’s complement form is (NOT (00010110) + 1) = (11101001 + 1) = 11101010

Answers

Answer:

Explanation:

A negative binary number is represeneted by its 2's complement value. To get 2's complement, you just need to invert the bits and add 1 to it. So the formula is:

  twos_complement = ~val + 1

So you start out with 22 and you want to make it negative.

22₁₀ = ‭0001 0110‬₂    

~22₁₀ = ‭1110 1001‬₂   inverting the bits

~22₁₀ + 1 = ‭1110 1010‬₂   adding 1 to it.

so -22₁₀ == ~22₁₀ + 1 == ‭1110 1010‬₂

Do the same process for 16-bits and 32-bits and you'll find that the most significant bits will be padded with 1's.

-22₁₀ = ‭1110 1010‬₂     8-bits

-22₁₀ = ‭1111 1111 1110 1010‬‬₂     16-bits

-22₁₀ = ‭‭1111 1111 1111 1111 1111 1111 1110 1010‬‬‬₂  32-bits

what are material engineers trying to discover when they study different materials

Answers

Answer:

The Material engineers trying to discover when they study different materials is described below in complete detail.

Explanation:

Material engineers analyze various elements to discover the purpose and explanation of its existence, the chemical characteristics, how long it has stood there, and how it influences human life. The material engineer is an engineering exercise that concentrates to enhance human activity by investigating the environment and the diverse elements or elements it holds.

Determine the enthalpy, volume and density of 1.0 kg of steam at a pressure of 0.5 MN/m2 and with a dryness fraction of 0.96

Answers

Answer:

Enthalpy, hsteam = 2663.7 kJ/kg

Volume, Vsteam = 0.3598613 m^3 / kg

Density = 2.67 kg/ m^3

Explanation:

Mass of steam, m = 1 kg

Pressure of the steam, P = 0.5 MN/m^2

Dryness fraction, x = 0.96

At P = 0.5 MPa:

Tsat = 151.831°C

Vf = 0.00109255 m^3 / kg

Vg = 0.37481 m^3 / kg

hf = 640.09 kJ/kg

hg = 2748.1 kJ/kg

hfg = 2108 kJ/kg

The enthalpy can be given by the formula:

hsteam = hf + x * hfg

hsteam = 640.09 + ( 0.96 * 2108)

hsteam = 2663.7 kJ/kg

The volume of the steam can be given as:

Vsteam = Vf + x(Vg - Vf)

Vsteam = 0.00109255 + 0.96(0.37481 - 640.09)

Vsteam = 0.3598613 m^3 / kg

From the steam table, the density of the steam at a pressure of 0.5 MPa is 2.67 kg/ m^3

a commercial refrigerator with r-134a as the working fluid is used to keep the refrigerated space at -35 c by rejecting waste heat to cooling water that enters the condenser at 18 c at a rate of 0.25 kg/s and leaves at 26 c. the refrigerant enters the condenser at 1.2 mpa and 50 c and leaves at the same pressure subcooled by 6 c. if the compressor consumes 3.3 kw of power , determine (a) the mass flow rate of the refrigerant, b) the refrigerant load, c) the cop, and d) the minimum power input to the compressor for the same refrigeration load.

Answers

At 1.2mpa pressure and 50c

What is pressure?
By pressing a knife against some fruit, one can see a straightforward illustration of pressure. The surface won't be cut if you press the flat part of the knife against the fruit. The force is dispersed over a wide area (low pressure).

a)Mass flow rate of the refrigerant
Therefore h1= condenser inlet enthalpy =278.28KJ/Kg
saturation temperature at 1.2mpa is 46.29C
Therefore the temperature of the condenser

T2 = 46.29C - 5
T2 = 41.29C

Now,
d)power consumed by compressor W = 3.3KW
Q4 = QL + w = Q4
QL = mR(h1-h2)-W
= 0.0498 x (278.26 - 110.19)-3.3
=5.074KW
Hence refrigerator load is 5.74Kg

(COP)r = 238/53
(Cop) = 4.490

Therefore the above values are the (a) mass flow rate of the refrigerant, b) the refrigerant load, c) the cop, and d) the minimum power input to the compressor for the same refrigeration load.

To learn more about pressure
https://brainly.com/question/13717268
#SPJ4

Which option identifies the section of a project charter represented in the following scenario?
Updated POS terminals will be available to the following five departments by July 31, 2015.
O project assumptions
O project deliverables
O project constraints
O project requirements

Answers

it’s b! i know this because i did the test!
Answer B , Just took the test and got 100%

You are writing a program to analyze the financial data for a set of companies. Your coworker gives you a text file of company data. However, you are worried that your coworker didn't type the data in correctly. Write a program that will tell you if the data is correctly formatted.

Answers

Here is a simple example of how you could write a program to check whether the data in a text file is correctly formatted:

def check_data_format(filename):

 # Open the file and read the contents

 with open(filename, 'r') as f:

   data = f.read()

 # Split the data into lines

 lines = data.split('\n')

 # Check the number of fields in each line

 num_fields = len(lines[0].split(','))

 for line in lines:

   if len(line.split(',')) != num_fields:

     print("Incorrect number of fields in line:", line)

     return False

 # Check the data types of each field

 for line in lines:

   fields = line.split(',')

   for field in fields:

     try:

       float(field)

     except ValueError:

       print("Incorrect data type in field:", field)

       return False

 # If the code execution reaches this point, the data is correctly formatted

 return True

# Example usage

if check_data_format('company_data.txt'):

 print("Data is correctly formatted")

else:

 print("Data is NOT correctly formatted")

To Learn More About  Program to Analyze the Financial data

https://brainly.com/question/29755045?referrer=searchResults

Loading that acts perpendicular to the longitudinal axis is called?

Answers

A transverse load is a load that acts perpendicular to the longitudinal axis.

Technician A says that tailor-rolled parts may be used for collision energy managements.

Technician B says that tailor-welded parts are aluminum and steel parts joined together. Who is right?


A Only

B only

Both A and B

Neither A nor B

Answers

The correct answer to your problem is the answers of a and b

A satellite at a distance of 36,000 km from an earth station radiates a power of 10 W from an
antenna with a gain of 25 dB. What is the received power if the effective aperture area of the
receiving antenna is 20 m2?

Answers

This an example solved please follow up with they photo I sent ok
A satellite at a distance of 36,000 km from an earth station radiates a power of 10 W from anantenna

The received power if the effective aperture area of the receiving antenna is 20 m2 is 177.77 m2.

What is Power?

In physics, power is referred to as the rate of energy conversion or transfer over time. The unit of power in the SI system, often known as the International System of Units, is the Watt (W). A single joule per second is one watt.

Power was formerly referred to as activity in some research. A scalar quantity is power. As power is always a function of labor done, it follows that if a person's output varies during the day depending on the time of day, so will his power.

A measure of the pace at which energy is transferred, power is a physical quantity. As a result, it can be described as the pace of job completion relative to time.

Therefore, The received power if the effective aperture area of the receiving antenna is 20 m2 is 177.77 m2.

To learn more about Power, refer to the link:

https://brainly.com/question/29575208

#SPJ2

Nitrogen is a compressed in a polytropic process with n=1.4 from 120 kpa and 10 degrees celsius ti 800 kpa in a piston cylinder device. Nitrogen is assumed to be an ideal gas. Gas cinstant and specific heats of nitrigen can be found from table A-2
what is the work produced per unit mass of N2
what is the heat transferred per unit mass of N2

Answers

The work produced per unit mass of N2 is -54.55 kJ/kg.

The heat transferred per unit mass of N2 is 473.3048 kJ/kg.

How to find the work produced and heat transferred per unit mass of N2?

To solve this problem, we need to use the First Law of Thermodynamics, which states that the change in internal energy of a system is equal to the heat added to the system minus the work done by the system:

ΔU = Q - W

where ΔU is the change in internal energy, Q is the heat added to the system, and W is the work done by the system.

We can assume that the nitrogen gas behaves as an ideal gas, so we can use the ideal gas law to relate pressure, volume, and temperature:

PV = mRT

where P is the pressure, V is the volume, m is the mass, R is the gas constant, and T is the temperature.

Using table A-2, we can find the gas constant and specific heats of nitrogen:

R = 0.2968 kJ/kg-K

\(C_p\) = 1.039 kJ/kg-K

\(C_v\) = 0.743 kJ/kg-K

To solve for the work done by the system, we can use the following equation for a polytropic process:

\(W = (P_2V{_2 - P_1V_1) / (n - 1)\)

where n is the polytropic index, which is given as 1.4 in this problem.

To solve for the heat added to the system, we can use the equation:

Q = ΔU + W

where ΔU is the change in internal energy, which can be expressed as:

ΔU = m\(C_v\)ΔT

where ΔT is the change in temperature.

Now we can plug in the values and solve for the work and heat:

Given:

\(P_1\) = 120 kPa

\(T_1\) = 10 °C = 283.15 K

\(P_2\) = 800 kPa

n = 1.4

First, we need to calculate the volume at the initial state (state 1) using the ideal gas law:

\(V_1 = mRT_1 / P_1 = (1 kg)(0.2968 kJ/kg-K)(283.15 K) / (120 kPa) = 0.6252 m^3/kg\)

Next, we can calculate the volume at the final state (state 2) using the polytropic process equation:

\(V_2 = V_1 (P_1 / P_2)^{(1/n)} = 0.6252 m^3/kg (120 kPa / 800 kPa)^{(1/1.4)} = 0.2739 m^3/kg\)

Now we can solve for the work done by the system:

\(W = (P_2V_2 - P_1V_1) / (n - 1) = (800 kPa)(0.2739 m^3/kg) - (120 kPa)(0.6252 m^3/kg) / (1.4 - 1) = -54.55 kJ/kg\)

Note that the negative sign indicates that work is done on the system (i.e., the piston cylinder device is compressed).

Finally, we can solve for the heat added to the system:

Q = ΔU + W = m\(C_v\)ΔT - W

We need to find the change in temperature, which can be expressed as:

\(\del T= T_2 - T_1 = (P_2V_2 / mR) - (P_1V_1 / mR) = (800 kPa)(0.2739 m^3/kg) / (1 kg)(0.2968 kJ/kg-K) - (120 kPa)(0.6252 m^3/kg) / (1 kg)(0.2968 kJ/kg-K) = 563.6 K\)

Now we can plug the values and solve for heat :

m=14kg

\(C_v\) = 0.743 kJ/kg-K

ΔT= 563.6K

W= -54.55 kJ/kg

Q = ΔU + W = m\(C_v\)ΔT - W=(1kg)(0.743 kJ/kg-K)(563.6K)-(-54.55 kJ/kg)= 473.3048 kJ/kg

Learn more about the application of the First Law of Thermodynamics

brainly.com/question/3808473

#SPJ11

If Nick's average stride length is 2.7 feet, how many strides will it take him to walk to school?

Answers

Answer: how far is the school?

Explanation:

Consider atmospheric air at 25 C and a velocity of 25 m/s flowing over both surfaces of a 1-m-long flat plate that is maintained at 125 C. Determine the rate of heat transfer per unit width from the plate for values of the critical Reynolds number corresponding to 105 , 5 105 , and 106 .

Answers

Answer:

Explanation:

Temperature of atmospheric air To = 25°C = 298 K

Free  stream velocity of air Vo = 25 m/s

Length and width of plate = 1m

Temperature of plate Tp = 125°C = 398 K

We know for air, Prandtl number Pr = 1

And for air, thermal conductivity K = 24.1×10?³ W/mK

Here, charectorestic dimension D = 1m

 

Given value of Reynolds number Re = 105

For laminar boundary layer flow over flat plate

= 3.402

Therefore, hx = 0.08199 W/m²K

So, heat transfer rate q = hx×A×(Tp – To)

                                          = 0.08199×1×(398 – 298)

Other Questions
A skating rink attendant monitored the number of injuries at the rink over the past year. He tracked the ages of those injured and the kinds of skates worn during injury. In-line skates Roller skates 6 2 Age 8 Age 10 3 3 o What is the probability that a randomly selected injured skater was wearing roller skates given that the injured skater was age 10? Simplify any fractions Solve each equation.Show all steps4) -8(-6-5k)=-232 Suppose you are trying to find the volume of a box based on the given measurements for the length, width, and height of the box, where the height was measured in two parts. length, =2.20 in width, =2.91 in height, =10.4 in+1 in Calculate the height, , of the box, first keeping all digits, then rounding to the proper number of significant figures. Nellie is buying bird seed to put in her bird feeders. She uses about 10 pounds of bird seed each week, but has room to store any extra that she purchases. The bird seed comes in 3 different sizes as given below: 3. 5 pounds for $2. 52 7. 5 pounds for $5. 40 11 pounds for $7. 92 Nellie is trying to be a smart shopper and get the best deal on the bird seed. Which size bag of bird seed should Nellie buy? a. Nellie should buy the 3. 5 pound bags because they have the cheapest unit price b. Nellie should buy the 7. 5 pound bags because they have the cheapest unit price c. Nellie should buy the 11 pound bags because they have the cheapest unit price. D. Nellie should buy any size she wishes because they all have the same unit price. Please select the best answer from the choices provided A B C D. Pls get this right I give brainliest write something positive that happened in your life this week. Based on the prompt, what is your purpose for writing? to inform readers about eighteenth-century ireland to describe the most important ideas in swifts essay and explain his reason for writing to make an argument about whether or not satire is effective 1)Firms in long-run equilibrium in a perfectly competitive industry will produce at the low points of their average total cost curves becausefree entry implies that long-run profits will be zero no matter how much each firmproduces.firms seek maximum profits and to do so they must choose to produce whereaverage costs are minimized.firms maximize profits and free entry implies that maximum profits will be zero.firms in the industry desire to operate efficiently.2)Long-run producer surplus in a perfectly competitive industry accrues mainly toa. suppliers of inputs with inelastic supply curves.b. suppliers of inputs with elastic supply curves.c. firms' owners.d. marginal consumers Which describes slate? non-foliated igneous does not split into layers grains arranged in parallel layers PLS HELP !! im not very good at math and cant find the answer anywhere true or false: scarce resources can be a source of conflict within organizations. The perimeter of a standard-sized rectangular rug is 44 feet. The width is 2 feetless than the length. Find the dimensions. Which of the following is true about ischemic stroke? a. Often caused by emboli from the basilar arteries b. Has risk factors that include atherosclerosis c. Can be a result of a hypercoagulable state d. Results from hemorrhage into brain tissue Is associated with acute hypertension Checks or safety procedures are put in place to protect the integrity of the system is referred to as? If Temperature 25 C and volume is 117.5 cm. Explain volume temperature relationship using Charless law.(No links or else I'll report.Don't answer if u dont know.)Thank You. Find the area of each circle. Round to the nearest tenth. how does a liver cell respond to insulin What is the magnitude of a vector that has the following components: x = 32 m y = -59 m 1. Name which of the following changes with a "conjugated verb? * Read the excerpt from The Odyssey about Odysseus and his son in battle. Telemachus swerved around him, leaving the long dark spear planted in Amphinomus. If he paused to yank it out someone might jump him from behind or cut him down with a sword at the moment he bent over. So he ranran from the tables to his father's side and halted, panting, saying: "Father let me bring you a shield and spear, a pair of spears, a helmet. I can arm on the run myself; I'll give outfits to Eumaeus and this cowherd. Better to have equipment." How do Telemachuss actions in battle compare to his fathers? Telemachus is more impulsive than Odysseus in battle. Telemachus is more hesitant than Odysseus in battle. Both Telemachus and Odysseus are quick-thinking in battle. Both Telemachus and Odysseus are arrogant in battle.