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 purpose of pasteurizing milk is to
katen-ka-za [31]

Answer:

i think it c

Explanation:

6 0
3 years ago
Read 2 more answers
Which option should the engineers focus on as they develop the train in the following scenario?
pav-90 [236]

Answer:

  Engineers can design a train with a regenerative braking system

Explanation:

Assuming the point of the question is that the engineers want to focus on using energy efficiently when starting and stopping, they would likely want to consider a regenerative braking system. Such a system can store energy during braking so that it can be used during starting, reducing the amount of energy that must be supplied by an outside power source.

5 0
3 years ago
A cone penetration test was carried out in normally consolidated sand, for which the results are summarized below: Depth (m) Con
Cerrena [4.2K]

Answer:

hello your question is incomplete attached below is the missing equation related to the question  

answer : 40.389° , 38.987° , 38° , 39.869° , 40.265°

Explanation:

<u>Determine the friction angle at each depth</u>

attached below is the detailed solution

To calculate the vertical stress = depth * unit weight of sand

also inverse of Tan = Tan^-1

also qc is in Mpa while σ0 is in kPa

Friction angle at each depth

2 meters = 40.389°

3.5 meters  = 38.987°

5 meters = 38.022°

6.5 meters = 39.869°

8 meters = 40.265°

6 0
3 years ago
Three groups of students are given study outlines for 6 weeks. One group studies 2 hours a night, a second group studies 1 hour
katrin2010 [14]

Answer:

The constant here is the study outline

Explanation:

In scientific research, the constant variable is that part/variable of the experiment that does not change or is set not to change. Examples include temperature, environment or height.

Assuming the scenery described in this question is an experiment. All the groups presented are bound by a constant during the experiment. The constant here is the study outline. The study outline provided to the students is not going to change.

NOTE: There could be confusion as regards the answer being the final exam grade but that will be the dependent variable as that will be the outcome of the experiment while the time spent to study will be the independent variable.

8 0
2 years ago
A missile flying at high speed has a stagnation pressure and temperature of 5 atm and 598.59 °R respectively. What is the densit
alexdok [17]

Answer:

5.31\frac{kg}{m^3}

Explanation:

Approximately, we can use the ideal gas law, below we see how we can deduce the density from general gas equation. To do this, remember that the number of moles n is equal to \frac{m}{M}, where m is the mass and M the molar mass of the gas, and the density is \frac{m}{V}.

For air M=28.66*10^{-3}\frac{kg}{mol} and \frac{5}{9}R=K

So, 598.59 R*\frac{5}{9}=332.55K

pV=nRT\\pV=\frac{m}{M}RT\\\frac{m}{V}=\frac{pM}{RT}\\\rho=\frac{pM}{RT}\\\rho=\frac{(5atm)28.66*10^{-3}\frac{kg}{mol}}{(8.20*10^{-5}\frac{m^3*atm}{K*mol})332.55K}=5.31\frac{kg}{m^3}

7 0
3 years ago
Other questions:
  • 1. Create a class called Name that represents a person's name. The class should have fields named firstName representing the per
    8·2 answers
  • What is NOT an example of professional networking?
    6·1 answer
  • Suppose an assembly requires five components from five different vendors. To guarantee starting the assembly on time with 90 per
    14·1 answer
  • If the bolt head and the supporting bracket are made of the same material having a failure shear stress of 'Tra;i = 120 MPa, det
    9·1 answer
  • Fluorescent troffers are a type of _ lighting fixture
    6·1 answer
  • You are given a C program "q2.c" as below. This program is used to calculate the average word length for a sentence (a string in
    5·1 answer
  • If you have a hole diameter of 0.250 with a tolerance of ±0.005, what are the limits of the hole size?
    13·1 answer
  • Design drawings use line styles of up to eight different varieties to communicate important information about the item. true or
    7·1 answer
  • Determine the initial void ratio, the relative density and the unit weight (in pounds per cubic foot) of the specimens for each
    6·1 answer
  • Technician A ay that acid rain doe the mot harm when it firt fall on a finih. Technician B ay that hard water potting i uually j
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!