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
(True/False) Unix is written in the C language. *<br> True<br> O False
Katarina [22]

Answer:

false

Explanation:

8 0
2 years ago
Read 2 more answers
Repetitive movements at work can lead to injuries. True or False
OverLord2011 [107]
Answer

True

Explanation

RSI can occur when you do repetitive movements. Those movements can cause your muscles and tendons to become damaged over time. Some activities that can increase your risk for RSI are: stressing the same muscles through repetition.
8 0
2 years ago
A cylindrical metal specimen having an original diameter of 12.8 mm and gauge length of 50.80 mm is pulled in tension until frac
Sedaia [141]

Answer:

%Reduction in area = 73.41%

%Reduction in elongation = 42.20%

Explanation:

Given

Original diameter = 12.8 mm

Gauge length = 50.80mm

Diameter at the point of fracture = 6.60 mm (0.260 in.)

Fractured gauge length = 72.14 mm.

%Reduction in Area is given as:

((do/2)² - (d1/2)²)/(do/2)²

Calculating percent reduction in area

do = 12.8mm, d1 = 6.6mm

So,

%RA = ((12.8/2)² - 6.6/2)²)/(12.8/2)²

%RA = 0.734130859375

%RA = 73.41%

Calculating percent reduction in elongation

%Reduction in elongation is given as:

((do) - (d1))/(d1)

do = 72.14mm, d1 = 50.80mm

So,

%RA = ((72.24) - (50.80))/(50.80)

%RA = 0.422047244094488

%RA = 42.20%

3 0
3 years ago
Who was part of dempwolf his firm when he first started
Zinaida [17]

Explanation:

Dempwolf created by John Augustus, Among the most prominent innovative solutions in Southern California Pennsylvania was established by Dempwolf with  brother Reinhardt or uncle's son Frederick entered the company of J.A. Dozens of structures in 10 states were engineered by Dempwolf.

5 0
2 years ago
Can the MOXIE created by NASA be used on earth
Alisiya [41]

Answer:

MOXIE is designed to generate up to 10 grams of oxygen per hour. This technology demonstration was designed to ensure the instrument survived the launch from Earth, a nearly seven-month journey through deep space, and touchdown with Perseverance on Feb

4 0
2 years ago
Other questions:
  • Many companies are combining their online business activities with an existing physical presence. In about 100 words, explain wh
    11·1 answer
  • Technician A says that you don’t need to use an exhaust extraction system when working on vehicles equipped with a catalytic con
    9·1 answer
  • Suppose that a wing component on an aircraft is fabricated from an aluminum alloy that has a plane strain fracture toughness of
    13·1 answer
  • Air is compressed in the compressor of a turbojet engine. Air enters the compressor at 270 K and 58 kPa and exits the compressor
    13·1 answer
  • Why does the auto industry prefer uniform (national) standards for automobile emissions as opposed to regionally varying standar
    11·1 answer
  • The annual storage in Broad River watershed is 0 cm/y. Annual precipitation is 100 cm/y and evapotranspiration is 50 cm/y. The s
    10·2 answers
  • Prove the following languages are nonregular, once using the pumping lemma and once using the Myhill-Nerode theorem. When using
    15·1 answer
  • What is the value of the energy (in Joules) stored by the mobile phone battery (capacity of 1.8 Ah), if it is rated at 3.7 V
    15·2 answers
  • Digital leaders are people who __ others down a particular path.
    13·2 answers
  • A misfire code is a type ____ DTC<br> A) 1 or 2<br> B) a or b<br> C) c or d<br> D l or ll
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!