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
A reservoir delivers water to a horizontal pipeline 39 long The first 15 m has a diameter of 50 mm, after which it suddenly beco
allsm [11]

Answer:

The difference of head in the level of reservoir is 0.23 m.

Explanation:

For pipe 1

d_1=50 mm,f_1=0.0048

For pipe 2

d_2=75 mm,f_2=0.0058

Q=2.8 l/s

Q=2.8\times 10^{-3]

We know that Q=AV

Q=A_1V_1=A_2V_2

A_1=1.95\times 10^{-3}m^2

A_2=4.38\times 10^{-3} m^2

So V_2=0.63 m/s,V_1=1.43 m/s

head loss (h)

h=\dfrac{f_1L_1V_1^2}{2gd_1}+\dfrac{f_2L_2V_2^2}{2gd_2}+0.5\dfrac{V_1^2}{2g}

Now putting the all values

h=\dfrac{0.0048\times 15\times 1.43^2}{2\times 9.81\times 0.05}+\dfrac{0.0058\times 24\times 0.63^2}{2\times 9.81\times 0.075}+0.5\dfrac{1.43^2}{2\times 9.81}

So h=0.23 m

So the difference of head in the level of reservoir is 0.23 m.

8 0
3 years ago
What’s the answer please help
irina1246 [14]

Answer:

It B

Explanation:

4 0
3 years ago
5. (5 points) Select ALL statements that are TRUE A. For flows over a flat plate, in the laminar region, the heat transfer coeff
finlep [7]

Answer:

The following statements are true:

A. For flows over a flat plate, in the laminar region, the heat transfer coefficient is decreasing in the flow direction

C. For flows over a flat plate, the transition from laminar to turbulence flow only happens for rough surface

E. In general, turbulence flows have a larger heat transfer coefficient compared to laminar flows 6.

Select ALL statements that are TRUE

B. In the hydrodynamic fully developed region, the mean velocity of the flow becomes constant

D. For internal flows, if Pr>1, the flows become hydrodynamically fully developed before becoming thermally fully developed

Explanation:

7 0
3 years ago
A liquid phase chemical reaction (A → B) takes place in a well-stirred tank. The concentration of compound A in the feed is CA0
SCORPION-xisa [38]

Answer:

EH buddy use a sparkplug use a drill through a hose im from da bronx

Explanation:

4 0
3 years ago
The purification of hydrogen gas is possible by diffusion through a thin palladium sheet. Calculate the number of kilograms of h
diamong [38]

Answer:

M=0.0411 kg/h or 4.1*10^{-2} kg/h

Explanation:

We have to combine the following formula to find the mass yield:

M=JAt

M=-DAt(ΔC/Δx)

The diffusion coefficient : D=6.0*10^{-8} m/s^{2}

The area : A=0.25 m^{2}

Time : t=3600 s/h

ΔC: (0.64-3.0)kg/m^{3}

Δx: 3.1*10^{-3}m

Now substitute the  values

M=-DAt(ΔC/Δx)

M=-(6.0*10^{-8} m/s^{2})(0.25 m^{2})(3600 s/h)[(0.64-3.0kg/m^{3})(3.1*10^{-3}m)]

M=0.0411 kg/h or 4.1*10^{-2} kg/h

8 0
3 years ago
Other questions:
  • What’s another name for a service overcurrent device?
    11·1 answer
  • Define initial set and final set. Briefly discuss one method used to determine them. The following laboratory tests are performe
    12·1 answer
  • In remote areas, your gps devices may lose reception. It’s a good idea to have a
    7·2 answers
  • Why is it important to cut all the way through an electrical wire on the first try?
    8·1 answer
  • Water at atmospheric pressure boils on the surface of a large horizontal copper tube. The heat flux is 90% of the critical value
    11·1 answer
  • A coal fired power plant geneartes 2.4 lbs. of CO2 per kWh. A lighting system consumes 300,000kWh per year. A corporation is con
    15·1 answer
  • Where you live might affect how often you change your cabin air filter.<br> True<br> False
    8·1 answer
  • PLEASE HELP!!!!!!!!!!!!!!!!!!!!! I AM BEING TIMED!!!!!!!!!!!!!!!!!!!!!! 30 MINUTES LEFT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    7·2 answers
  • Practice finding the volume of a sphere.
    10·2 answers
  • Các đặc điểm chính của đường dây dài siêu cao áp .
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!