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 sample of soil has a volume of 0.45 ft^3 and a weight of 53.3 lb. After being dried inan oven, it has a weight of 45.1 lb. It
topjm [15]

Answer:

a) the moisture content before it was placed in the oven is 18.18%

b) degree of saturation for soil is 72.19%

Explanation:

Given the data in the question;

Moisture Content = [(Weight of soil before dry - dry weight) / dry weight] × 100

so we substitute

Moisture content = [(53.3 - 45.1) / 45.1 ] × 100

= (8.2/45.1) × 100

= 18.18%

Therefore the moisture content before it was placed in the oven is 18.18%

Dry Unit Weight = dry weight / volume

Dry Unit Weight = 45.1 lb / 0.45 ft³

Dry Unit Weight = 100.22 lb/ft³

we know that;

dry unit weight = (Specific gravity × unit weight of water) / (1 + e)

we also know that; unit weight of water is 62.43 lbf/ft³

so we substitute

e = (2.70×62.43 / 100.22) - 1

e = 1.68 - 1

e = 0.68

so void ratio e = 0.68

Now we determine the degree of saturation using the equation;

degree of saturation = (Moisture content × specific gravity) / void ratio

we substitute

degree of saturation = ( 18.18% × 2.7) / 0.68

= 0.49086 / 0.68

= 0.7219 ≈ 72.19%

Therefore degree of saturation for soil is 72.19%

7 0
3 years ago
Name two types of battery chargers that are used in mechanics
tekilochka [14]
Primary batteries
Secondary batteries
7 0
3 years ago
I’m in Sociology Class guys and I need help on this question!
Kitty [74]

The stance that a person will take on increasing the minimum wage  is that higher earnings would boast the total standard of living for anyone that is earning minimum wage and it is one that  can provide them with a lot of appropriate income level to manage the cost of living as it increases.

<h3>How would you validate your stance through research?</h3>

I will take a survey using a sample population of minimum wage workers and give them questionnaires to fill.

<h3>What are positive effects of reasons for raising the minimum wage?</h3>
  • The merit of raising the minimum wage are:
  • It boast or Improves employee in terms of retention.
  • It also brings up the demand for goods and services.
  • It tends to increase employee performance.

Therefore, The stance that a person will take on increasing the minimum wage  is that higher earnings would boast the total standard of living for anyone that is earning minimum wage and it is one that  can provide them with a lot of appropriate income level to manage the cost of living as it increases.

Learn more about minimum wage from

brainly.com/question/26699459

#SPJ1

5 0
1 year ago
Answer back to question for la ,lot points
Lerok [7]

Answer:

yes

Explanation:

yes

5 0
3 years ago
You are working as an electrical technician. One day, out in the field, you need an inductor but cannot find one. Looking in you
telo118 [61]

Answer:

a) the inductance of the coil is 6 mH

b) the emf generated in the coil is 18 mV  

Explanation:

Given the data in the question;

N = 570 turns

diameter of tube d = 8.10 cm = 0.081 m

length of the wire-wrapped portion l =  35.0 cm = 0.35 m

a) the inductance of the coil (in mH)

inductance of solenoid

L = N²μA / l

A = πd²/4  

so

L = N²μ(πd²/4) / l

L = N²μ(πd²) / 4l

we know that μ = 4π × 10⁻⁷ TmA⁻¹

we substitute

L = [(570)² × 4π × 10⁻⁷× ( π × (0.081)² )] / 4(0.35)

L =  0.00841549 / 1.4

L = 6 × 10⁻³ H    

L = 6 × 10⁻³ × 1000 mH

L = 6 mH

Therefore, the inductance of the coil is 6 mH

b)

Emf ( ∈ ) = L di/dt

given that; di/dt = 3.00 A/sec

{∴ di = 3 - 0 = 3 and dt = 1 sec}

Emf ( ∈ ) = L di/dt

we substitute

⇒ 6 × 10⁻³ ( 3/1 )

= 18 × 10⁻³ V

= 18 × 10⁻³ × 1000

= 18 mV  

Therefore, the emf generated in the coil is 18 mV  

7 0
3 years ago
Other questions:
  • In this milestone we will create a Course class to represent a course and display its information on the screen. We will create
    9·1 answer
  • In which of the following states are you most likely to find a home with a basement and why?
    13·1 answer
  • How to solve this question
    11·1 answer
  • The assembly consists of two blocks A and B, which have a mass of 20 kg and 30 kg, respectively. Determine the distance B must d
    14·2 answers
  • PLEASE HELP ASAP!!! Thanks
    11·1 answer
  • Please choose a specific type of stability or control surface (e.g., a canard) and explain how it is used, what it is used for,
    5·1 answer
  • After adjusting your seat, your___ should be as closest possible to the back rest.
    14·1 answer
  • Please what is dif<br>ference between building technology and building engineering.​
    14·2 answers
  • Propose any improvements if there are any in brake system
    7·1 answer
  • A common boundary-crossing problem for engineers is when their home country' values come into sharp contrast with the host count
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!