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
Steam at 40 bar and 500o C enters the first-stage turbine with a volumetric flow rate of 90 m3 /min. Steam exits the turbine at
a_sh-v [17]

Answer:

(a) 62460 kg/hr

(b) 17,572.95 kW

(c) 3,814.57 kW

Explanation:

Volumetric flow rate, G = 30 m³ / 1 min => 90 / 60 => 1.5

Calculate for h₁ , h₂ , h₃

h₁ is h at P = 40 bar, 500°C => 3445.84 KJ/Kg

Specific volume steam, ц = 0.086441 m³kg⁻¹

h₂ is h at P = 20 bar, 400°C => 3248.23 KJ/Kg

h₃ is h at P = 20 bar, 500°C => 3468.09 KJ/Kg

h₄ is hg at P = 0.6 bar from saturated water table => 2652.85 KJ/Kg

a)

Mass flow rate of the steam, m = G / ц

m = 1.5 / 0.086441

m = 17.35 kg/s

mass per hour is m = 62460 kg/hr

b)

Total Power produced by two stages

= m (h₁ - h₂) + m (h₃ - h₁)

= m [(3445.84 - 3248.23) + (3468.09 - 2652.85)]

= m [ 197.61 + 815.24 ]

= 17.35 [1012.85]

= 17,572.95 kW

c)

Rate of heat transfer to the steam through reheater

= m (h₃ - h₂)

= 17.35 x (3468.09 - 3248.23)

= 17.35 x 219.86

= 3,814.57 kW

8 0
3 years ago
Technician A says that a lack of lubrication on the back of the disc brake pads can cause brake noise. Technician B says that pa
sweet-ann [11.9K]

Answer:

Technician A and B both are correct.

Explanation:

According to Technician A, we can stop noise by applying lubricant (Break friction).

According to Technician A, we can stop noise by set-up right position for break pad.

7 0
3 years ago
If f(
EastWind [94]
Can you retype this in for me so I can do it cause it’s lined up instead of horizontal
8 0
3 years ago
What is the relationship between permanent modular construction (PMC) and purpose-built construction?
Vitek1552 [10]

Answer:

A. PMC tends to fit the construction purposes for which it was specifically designed.

Explanation:

took the test go it right

7 0
3 years ago
What are the atomic binding force and energy? how do they relate to materials strength and thermal stability.
Elanso [62]

Answer:

As we know that every molecule is attached by a strong force .The force required to disassemble the atoms is know as atomic binding force or we can say that the force required to disassemble the electron from atoms is known as binding force.On the other hand the energy require to doing this is known as atomic binding energy.

If the binding force is high then it will become difficult to disassemble thermally as well as mechanically.So we can say that it have direct relationship with   materials strength and thermal stability.

7 0
3 years ago
Other questions:
  • The power supply converts the wall outlet AC power into DC power. T or F
    15·1 answer
  • A 200-L tank (see Fig. P4.107) initially contains water at 100 kPa and a quality of 1%. Heat is transferred to the water, thereb
    6·1 answer
  • Define the isentropic efficiency for each of the following 3. a. i. Adiabatic turbine ii. Adiabatic compressor iii. Adiabatic no
    5·1 answer
  • The bulk modulus of a fluid if it undergoes a 1% change in volume when subjected to a pressure change of 10,000 psi is (a) 0.01
    13·1 answer
  • Which examples demonstrate common Energy Generation work environments? Check all that apply.
    12·1 answer
  • 30 points and brainiest if correct please help A, B, C, D
    15·1 answer
  • Calculate the torque produced by a motor that has 500 windings across a 30cm diameter rotating core. The core is 0.6 M long insi
    12·1 answer
  • Consider a single crystal of some hypothetical metal that has the FCC crystal structure and is oriented such that a tensile stre
    7·1 answer
  • **Please Help ASAP**
    6·1 answer
  • When converting liquid level units to sensor output signal units, you should first convert the liquid level units to _____ units
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!