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
What type of models can be communicated in more than one way.
guajiro [1.7K]
A 3-D model can be communicated, and can also be a visual model.
4 0
3 years ago
Fill in the correct answer.
mestny [16]

Answer:

Explanation:

A conservator with a(n) guardianship background and knowledge of foreign languages will have more job opportunities because they broaden the scope of work a conservator can undertake.

6 0
3 years ago
The rate of flow through an ideal clarifier is 8000m3 /d, the detention time is 1h and the depth is 3m. If a full-length movable
Fittoniya [83]

Answer:

a) 35%

b) yes it can be improved by moving the tray near the top

   Tray should be located ( 1 to 2 meters below surface )

   max removal efficiency ≈ 70%

c) The maximum removal will drop as the particle settling velocity = 0.5 m/h

Explanation:

Given data:

flow rate = 8000 m^3/d

Detention time = 1h

depth = 3m

Full length movable horizontal tray :  1m below surface

<u>a) Determine percent removal of particles having a settling velocity of 1m/h</u>

velocity of critical sized particle to be removed = Depth / Detention time

= 3 / 1 = 3m/h

The percent removal of particles having a settling velocity of 1m/h ≈ 35%

<u>b) Determine if  the removal efficiency of the clarifier can be improved by moving the tray, the location of the tray  and the maximum removal efficiency</u>

The tray should be located near the top of the tray ( i.e. 1 to 2 meters below surface ) because here the removal efficiency above the tray will be 100% but since the tank is quite small hence the

Total Maximum removal efficiency

=  percent removal_{above} + percent removal_{below}

= ( d_{a},v_{p} ) . \frac{d_{a} }{depth}  + ( d_{a},v_{p} ) . \frac{depth - d_{a} }{depth}  = 100

hence max removal efficiency ≈ 70%

<u>c) what is the effect of moving the tray would be if the particle settling velocity were equal to 0.5m/h?</u>

The maximum removal will drop as the particle settling velocity = 0.5 m/h

7 0
3 years ago
Consider an adiabatic throttling valve with water entering at pressure of 1.5 MPa, a temperature of 150°C and a velocity of 4.5
Marta_Voda [28]

Answer:

So the exit velocity of water is 4.5 m/s

Explanation:

Given that

Water entering pressure = 1.5 MPa

Temperature = 150°C

Velocity = 4.5 m/s

From first law of thermodynamics for open system

h_1+\dfrac{V_1^2}{2}+Q=h_2+\dfrac{V_2^2}{2}+W

Here given that valve is adiabatic so Q= 0

In valve W= 0

Wen also also know that throttling process is an constant enthaply process so

h_1=h_2

h_1+\dfrac{V_1^2}{2}+Q=h_2+\dfrac{V_2^2}{2}+W

h_1+\dfrac{V_1^2}{2}+0=h_1+\dfrac{V_2^2}{2}+0

So from above equation we can say that

V_2=V_1

So the exit velocity of water is 4.5 m/s

5 0
3 years ago
When troubleshooting an inoperative power window motor, first check the:
Gwar [14]

When troubleshooting an inoperative power window motor, first check the:

fuse for the appropriate circuit. wiring to the motor. switch for the motor  ground for the appropriate circuit will be work in the following way.

Explanation:

Use a test light to check the voltage at the motor of the window that is inoperative.

  • Press the power window switch during the testing process. If there is no voltage at the motor, there may be problems in the wiring that runs from the motor to the switch.
  • Check for short, loose or open wires.
  • Causes of power window malfunctions -Window malfunctions are typically caused from either a faulty window regulator (also called a window track), or a broken motor, cable pulley or window switch.  Intermittent problems can cause windows to stop working temporarily only to work again and have more problems later.
  • Symptoms of a Bad or Failing Window Motor / Regulator Assembly. Common signs include having to press multiple times to roll the window up or down, slower or faster window speed, and clicking sounds from the door.
  • What to Do When Your Power Window Won't Go Up  -1.Remove the door panel. 2.Disconnect the window from the motor. 3.Access and disengage the motor. 4.Reconnect the window to the motor and raise. 5.Replace the door panel.
  • Once your window is all the way down, hold the button down for 2-5 seconds. Release the button after you've held it down for a short period of time. On some vehicles, the required time to reset the window is 2 seconds.
3 0
3 years ago
Other questions:
  • : The interior wall of a furnace is maintained at a temperature of 900 0C. The wall is 60 cm thick, 1 m wide, 1.5 m broad of mat
    12·1 answer
  • A DNS record that's used to redirect traffic from one domain name to another is known as a _______ record.
    11·1 answer
  • Suppose you have a Y-connected balanced three-phase load which consumes 200 kW with pf of 0.707 lagging. The line-to-line voltag
    14·1 answer
  • Two common methods of improving fuel efficiency of a vehicle are to reduce the drag coefficient and the frontal area of the vehi
    14·1 answer
  • potential difference is the work done in moving a unit positive charge from one point to another in an electric field. State Tru
    12·1 answer
  • Can someone pls give me the answer to this?
    14·1 answer
  • Would you rather be fishing or hunting?
    13·2 answers
  • Draw the six principal views of
    13·1 answer
  • The B-pillar may also be called the:
    10·1 answer
  • Which option identifies the type of device the engineer will develop in the following scenario?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!