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 sewage lagoon that has a surface area of 10 ha and a depth of 1 m is receiving 8,640 m^3 /d of sewage containing 100 mg/L of b
Marysya12 [62]

Answer: Coefficient= 0.35 per day

Explanation:

To find the bio degradation reaction rate coefficient, we have

k= \frac{(Cin)(Qin)-(Cout)(Qout)}{(Clagoon)V}

Here, the C lagoon= 20 mg/L

Q in= Q out= 8640 m³/d

C in= 100 mg/L

C out= 20 mg/L

V= 10 ha* 1* 10

V= 10⁵ m³

So, k= \frac{8640*100-8640*20}{20*10^5}

k= 0.35 per day

6 0
3 years ago
A 15-ft beam weighing 570 lb is lowered by means of two cables unwinding from overhead cranes. As the beam approaches the ground
7nadin3 [17]

Answer:

I. Tension (cable A) ≈ 6939 lbf

II. Tension (cable B) ≈ 17199 lbf

Explanation:

Let's begin by listing out the data that we were given:

mass of beam (m) = 570 lb, deceleration (cable A) = -20 ft/s², deceleration (cable B) = -2 ft/s²,

g = 32.17405 ft/s²

The tension on an object is given by the product of mass of the object by gravitational force plus/minus the product of mass by acceleration.

Mathematically represented thus:

T = mg + ma

where:

T = tension, m = mass, g = gravitational force,

a = acceleration

I. For Cable A, we have:

T = mg + ma = (570 * 32.17405) + [570 * (-20)]

T = 18339.2085 - 11400 = 6939.2085

T ≈ 6939 lbf

II. For Cable B, we have:

T = mg + ma = (570 * 32.17405) + [570 * (-2)]

T = 18339.2085 - 1140 = 17199.2085

T ≈ 17199 lbf

4 0
4 years ago
Identify which sound type each line contains.
nydimaria [60]

Answer:i can not see it

Explanation:

4 0
3 years ago
A water supply agency is planning to add two reservoirs to its system. Water will flow from Reservoir A to Reservoir B via a 10,
NikAS [45]

Attached is the solution to the above question.

3 0
4 years ago
90% of traffic crashes are due to driver error.<br> True<br> False
kumpel [21]

90% of traffic crashes are due to driver error.

True

3 0
2 years ago
Read 2 more answers
Other questions:
  • A computer has a two-level cache. Suppose that 60% of the memory references hit on the first level cache, 35% hit on the second
    12·1 answer
  • Tranquilizing drugs that inhibit sympathetic nervous system activity often effectively reduce people's subjective experience of
    8·1 answer
  • The entire population of a given community is examined, and all who are judged to be free from bowel cancer are questioned exten
    12·1 answer
  • How far do you jog each morning? You prefer to jog in different locations each day and do not have a pedometer to measure your d
    14·1 answer
  • QUESTIONS
    12·1 answer
  • Which field in a Transmission Control Protocol (TCP) header is chosen from ephemeral ports?
    11·1 answer
  • In the given circuit, V(t)=12cos(2000t+45)V, R1=R2=2Ω, L1=L2=L3=3mH and C1=250μF. You are required to find the Thevenin equivale
    7·1 answer
  • Which is the maximum length for any opening on the surface of a 2G SMAW guided bend test specimen?
    11·1 answer
  • 14. The top plate of the bearing partition
    8·1 answer
  • Which design activity is part of the design for manufacturability (DFM) methodology?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!