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
barxatty [35]
3 years ago
11

Write the implementation (.cpp file) of the Player class from the previous exercise. Again, the class contains:

Engineering
1 answer:
hoa [83]3 years ago
7 0

Answer:

//Define the header file

#ifndef PLAYER_H

#define PLAYER_H

//header file.

#include <string>

//Use the standard namespace.

using namespace std;

//Define the class Player.

class Player

{

//Declare the required data members.

string name;

int score;

public:

//Declare the required

//member functions.

void setName(string par_name);

void setScore(int par_score);

string getName();

int getScore();    

}

//End the definition

//of the header file.

#endif

Player.cpp:

//Include the "Player.h" header file,

#include "Player.h"

//Define the setName() function.

void Player::setName(string par_name)

{

name = par_name;

}

//Define the setScore() function.

void Player::setScore(int par_score)

{

score = par_score;

}

//Define the getName() function.

string Player::getName()

{

return name;

}

//Define the getScore() function.

int Player::getScore()

{

return score;

}

You might be interested in
The intake and exhaust processes are not considered in the p-V diagram of Otto cycle. a) true b) false
vovangra [49]

Answer:

b) false

Explanation:

We know that Otto cycle is the ideal cycle for all petrol working engine.In Otto cycle all process are consider is ideal ,means there is no any ir-reversibility in the processes.

It consist four processes

1-2:Reversible adiabatic compression

2-3:Constant volume heat addition

3-4:Reversible adiabatic expansion

3-4:Constant volume heat rejection

Along with above 4 processes intake and exhaust processes are parallel to each other.From the P-v diagram we can see that all processes.

But actually in general we are not showing intake and exhaust line then it did not mean that in Otto cycle did not have intake and exhaust processes.

6 0
3 years ago
Zachary finished an internship as a Software Quality Assurance Engineer. For which job is he best qualified?
astra-53 [7]

Answer:

B. A software development firm needs someone to find and fix bugs on multiple computer platforms.

Explanation:

A software quality assurance engineer is someone who monitors every phase of the software development process so as to ensure design quality, making sure that the software adheres to the standards set by the development company. Finding bugs would make this intern a amazing bug finder

6 0
3 years ago
Read 2 more answers
g If the rails are originally laid in contact, what is the stress in them on a summer day when their temperature is 31.0
Anettt [7]

A) The amount of space must be left between adjacent rails if they are just to touch on a summer day when their temperature is 31.0 °C is; 0.6048 cm

B) The stress in the rails on a summer day when their temperature is 31.0 °C is; 86.4 × 10⁶ Pa

<h3>Linear Thermal Expansion</h3>

We are given;

Length; L = 14 m

Initial Temperature; T_i = −5 °C

Final Temperature; T_f = 31 °C

The formula for Linear Thermal Expansion is;

ΔL = L_i * α * ΔT

where;

L_i is initial length

α is thermal expansion

ΔL is change in length

ΔT is change in temperature

Now, the thermal expansion of steel from online tables is α = 1.2 × 10⁻⁵ C⁻¹

Thus;

ΔL = 14 * 1.2 × 10⁻⁵  * (31 - (-5))

ΔL = 6.048 × 10⁻³ m = 0.6048 cm

The formula to get the stress is;

σ = Y * α  * ΔT

where;

Y is young's modulus of steel = 20 × 10¹⁰ Pa

α is thermal expansion

ΔT is change in temperature

Thus;

σ = 20 × 10¹⁰ × 1.2 × 10⁻⁵ × (31 - (-5))

σ = 86.4 × 10⁶ Pa

The complete question is;

Steel train rails are laid in 14.0-m long segments placed end to end. The rails are laid on a winter day when their temperature is −5 °C.

(a) How much space must be left between adjacent rails if they are just to touch on a summer day when their temperature is 31.0 °C?

(b) If the rails are originally laid in contact, what is the stress in them on a summer day when their temperature is 31.0 °C?

Read more about Linear Thermal Expansion at; brainly.com/question/6985348

4 0
2 years ago
A well-insulated rigid vessel contains 3 kg of saturated liquid water at 40oC. The vessel also contains an electrical resistor t
user100 [1]

Answer:

The final temperature is 111.66°C

Explanation:

The given conditions :-

i) Well insulated means no heat loss.

ii) Rigid vessels means volume remains same.

iii) Initial temperature ( T₁ ) = 40°C. = 273 + 40 = 313 K

iv ) Mass of water in vessel = 3 kg.

v) current drawn by resistor ( i ) = 10 ampere.

vi) Voltage applied ( V ) = 50 volts.

vii) The time for which resistor operating ( t ) = 30 minute = 30 * 60 = 1800 seconds.

Now we have to calculate heat developed by resistor in vessel.

Q = V * i * t  = 50 * 10 * 1800 = 900,000 J = 900 KJ.

Since it is a rigid container so the work done is zero.

Q = du    ( du - change in internal energy)

Q = m * C * dT      ( C = 4.186 KJ/KgK )

Q = 3 * 4.186 * (T₂ - T₁ )

900 = 12.558 * ( T₂ - 313 )

T₂ - 313 = 71.6674

T₂ = 384.6674 K

T = 384.6674 - 273 = 111.66°C

So the final temperature is 111.66°C.

3 0
3 years ago
Technician A says that the neutral safety switch must be bad and should be replaced. Technician B says that the neutral safety s
lukranit [14]

Answer:

Technician A is correct

Explanation:

The neutral safety switch when bad must be replaced and not adjusted as suggested by technician B because if the neutral safety switch is bad the Engine might not crank when put in neutral but it will crank when put in park and this is very bad for the life of the Engine it is better to replace it. A test for a bad/faulty neutral safety switch will be required to ascertain the level of damage it might cause to the Engine and prompt replacement is essential as well.  because the neutral helps to prevent the car from starting when it is already engaged in a gear position therefore protecting the car from sudden collisions

3 0
3 years ago
Read 2 more answers
Other questions:
  • An 80-L vessel contains 4 kg of refrigerant-134a at a pressure of 160kPa. Determine (a) the temperature, (b) the quality, (c) th
    11·1 answer
  • A tank contains 350 liters of fluid in which 50 grams of salt is dissolved. Pure water is then pumped into the tank at a rate of
    8·1 answer
  • Assuming the point estimate in Problem 6.36 is the true population parameter, what is the probability that a particular assay, w
    15·1 answer
  • Consider the expansion of a gas at a constant temperature in a water-cooled piston-cylinder system. The constant temperature is
    13·1 answer
  • Here, we want to become proficient at changing units so that we can perform calculations as needed. The basic heat transfer equa
    15·1 answer
  • A water-filled manometer is used to measure the pressure in an air-filled tank. One leg of the manometer is open to atmosphere.
    15·1 answer
  • A very large plate is placed equidistant between two vertical walls. The 10-mm spacing between the plate and each wall is filled
    11·1 answer
  • What process is used to remove collodal and dissolved organic matter in waste water ​
    10·1 answer
  • Which symbol should be used for the given scenario?
    11·1 answer
  • A particle moving on a straight line has acceleration a = 5-3t, and its velocity is 7 at time t = 2. If s(t) is the distance fro
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!