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 rigid 10-L vessel initially contains a mixture of liquid and vapor water at 100 °C, with a quality factor of 0.123. The mixtur
masya89 [10]

Answer:

Q_{in} = 46.454\,kJ

Explanation:

The vessel is modelled after the First Law of Thermodynamics. Let suppose the inexistence of mass interaction at boundary between vessel and surroundings, changes in potential and kinectic energy are negligible and vessel is a rigid recipient.

Q_{in} = U_{2} - U_{1}

Properties of water at initial and final state are:

State 1 - (Liquid-Vapor Mixture)

P = 101.42\,kPa

T = 100\,^{\textdegree}C

\nu = 0.2066\,\frac{m^{3}}{kg}

u = 675.761\,\frac{kJ}{kg}

x = 0.123

State 2 - (Liquid-Vapor Mixture)

P = 476.16\,kPa

T = 150\,^{\textdegree}C

\nu = 0.2066\,\frac{m^{3}}{kg}

u = 1643.545\,\frac{kJ}{kg}

x = 0.525

The mass stored in the vessel is:

m = \frac{V}{\nu}

m = \frac{10\times 10^{-3}\,m^{3}}{0.2066\,\frac{m^{3}}{kg} }

m = 0.048\,kg

The heat transfer require to the process is:

Q_{in} = m\cdot (u_{2}-u_{1})

Q_{in} = (0.048\,kg)\cdot (1643.545\,\frac{kJ}{kg} - 675.761\,\frac{kJ}{kg} )

Q_{in} = 46.454\,kJ

3 0
3 years ago
Which option distinguishes the members of a software deployment process team most likely involved in the following scenario?
Alchen [17]

Answer:

A local bank, with several branches in three cities, requests changes to its mortgage calculation software.

5 0
3 years ago
An alloy is evaluated for potential creep deformation in a short-term laboratory experiment. The creep rate is found to be 1% pe
LenaWriter [7]

Answer:

a) Q = 251.758 kJ/mol

b) creep rate is    = 1.751 \times 10^{-5} \% per hr

Explanation:

we know Arrhenius expression is given as

\dot \epsilon =Ce^{\frac{-Q}{RT}

where

Q is activation energy

C is pre- exponential constant

At 700 degree C creep rate is\dot \epsilon = 5.5\times 10^{-2}% per hr

At 800 degree C  creep rate is\dot \epsilon = 1% per hr

activation energy for creep is \frac{\epsilon_{800}}{\epsilon_{700}} = = \frac{C\times e^{\frac{-Q}{R(800+273)}}}{C\times e^{\frac{-Q}{R(700+273)}}}

\frac{1\%}{5.5 \times 10^{-2}\%} = e^{[\frac{-Q}{R(800+273)}] -[\frac{-Q}{R(800+273)}]}

\frac{0.01}{5.5\times 10^{-4}} = ln [e^{\frac{Q}{8.314}[\frac{1}{1073} - \frac{1}{973}]}]

solving for Q we get

Q = 251.758 kJ/mol

b) creep rate at 500 degree C

we know

C = \epsilon e^{\frac{Q}{RT}}

    =- 1\% e{\frac{251758}{8.314(500+273}} = 1.804 \times 10^{12} \% per hr

\epsilon_{500} = C e^{\frac{Q}{RT}}

                         = 1.804 \times 10^{12}  e{\frac{251758}{8.314(500+273}}

                         = 1.751 \times 10^{-5} \% per hr

4 0
3 years ago
List the parts of a manual transmission <br><br> List the parts of a typical clutch assembly?
True [87]

Answer:

Explanation: Clutch Plate.

Clutch Cover.

Clutch Bearing (Release bearing)

Release Fork (clutch fork)

7 0
3 years ago
a vertical cylindrical container is being cooled in ambient air at 25 °C with no air circulation. if the initial temperature of
Sloan [31]

Answer:

the surface heat-transfer coefficient due to natural convection during the initial cooling period.  = 4.93 w/m²k

Explanation:

check attachement for answer explanation

7 0
3 years ago
Read 2 more answers
Other questions:
  • How does a car batteray NOT die?
    13·1 answer
  • Two kilograms of air in a piston-cylinder assembly undergoes an isothermal process from an initial state of 200K, 300kPa to 600k
    8·1 answer
  • The densities of several materials are given in SI units. Convert these to densities in U.S. customary units (slug/ft3), and als
    12·1 answer
  • I want to explain what 2000 feet looks like to young children so that they can imagine it in class
    12·1 answer
  • What are common names assigned to instruction addresses in a PLC program called
    8·1 answer
  • The two types of outlets that are found in an electrical system are:______
    7·1 answer
  • if when you put your shirt in your pants, your shirt is tucked, does that mean when your shirt is over your pants, your pants ar
    6·2 answers
  • How do you breed a linner?
    5·2 answers
  • Steam locomotives with a 4-6-2 wheel arrangement were usually classified as what?.
    5·1 answer
  • 1. What did observations between 1912 and 1917 show?_____
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!