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
An isentropic steam turbine processes 5.5 kg/s of steam at 3 MPa, which is exhausted at 50 kPa and 100°C. Five percent of this f
bija089 [108]

Answer:

The answer is 1823.9

Explanation:

Solution

Given that:

m = 5.5 kg/s

= m₁ = m₂ = m₃

The work carried out by the energy balance is given as follows:

m₁h₁ = m₂h₂ +m₃h₃ + w

Now,

By applying the steam table we have that<

p₃ = 50 kPa

T₃ = 100°C

Which is

h₃ = 2682.4 kJ/KJ

s₃ = 7.6953 kJ/kgK

Since it is an isentropic process:

Then,

p₂ =  500 kPa

s₂=s₃ = 7.6953 kJ/kgK

which is

h₂ =3207.21 kJ/KgK

p₁ = 3HP0

s₁ = s₂=s₃ = 7.6953 kJ/kgK

h₁ =3854.85 kJ/kg

Thus,

Since 5 % of this flow diverted to p₂ =  500 kPa

Then

w =m (h₁-0.05 h₂ -0.95 )h₃

5.5(3854.85 - 0.05 * 3207.21  - 0.95 * 2682.4)

5.5( 3854.83 * 3207.21 - 0.95 * 2682.4)

5.5 ( 123363249.32 -0.95 * 2682.4)

w=1823.9

3 0
3 years ago
How many color are in da rainbow​
abruzzese [7]
Seven colors are in the rainbow haha
5 0
2 years ago
Read 2 more answers
A thick steel slab ( 7800 kg/m3, 480 J/kg·K, 50 W/m·K) is initially at 300°C and is cooled by water jets impinging on one of its
AleksandrR [38]

Answer: 67.392s

Explanation: detailed calculation is shown below

4 0
3 years ago
Read 2 more answers
Please help is due tonight
Kipish [7]

Answer:

tHE answer is b

Explanation:

7 0
3 years ago
Read 2 more answers
How can statistical analysis of a dataset inform a design process
Shtirlitz [24]

Answer:

Explanation:.

3 0
3 years ago
Other questions:
  • What is Differential Analysis in fluid mechanics?
    13·1 answer
  • IN JAVA,
    6·1 answer
  • Suppose we want to determine how many of the bits in a twelve-bit unsigned number are equal to zero. Implement the simplest circ
    14·1 answer
  • With a reservoir pressure of 1.0 MPa and temperature of 750 K, air enters a converging-diverging nozzle, in a steady fashion. Fl
    5·1 answer
  • Determine the average power, complex power and power factor (including whether it is leading or lagging) for a load circuit whos
    9·2 answers
  • What engine does the mercedes 500e have​
    5·1 answer
  • Calculate the radius of a circular orbit for which the period is 1 day​
    13·1 answer
  • What are the specifications state that all work shall be done?
    10·1 answer
  • Please answer i dont understand and dont know the answer​
    14·1 answer
  • Mang Tisoy bought two bags of onion from the market. One bag weighed 8 kg
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!