subject
Computers and Technology, 20.03.2020 04:00 rosas8

Create Player. h and Player. cpp to implement the Player class as described below. You will also need to create a playerDriver. cpp file to test your Player class implementation, but do not include those routines here. The Player class has the following attributes:Data members (private):Data members (private):
string: name The player’s name
double: points The player’s points
Member functions (public):
Default constructor Set name="" and points to value 0.
Parameterized constructor Takes a string and double initializing name and points, in this order
getName() Returns the player’s name as a string
getPoints() Returns the player’s points as a double
setName(string) Sets the player’s name (and returns nothing)
setPoints(double) Sets the player’s points (and returns nothing)

In the Answer Box below, paste your Player class and its implementation (the contents of Player. h and Player. cpp).

Do not have #ifndef or #define.
Do not add #include (or any other headers - they are provided)
Do not add using namespace std;
Do not add main() function
Note that there are some random test cases. These are not edge cases, but rather just randomly generated input values to make sure code is flexible. They're also meant to be mildly entertaining.

For example:

Test Result
// checking default constructor
Player stella;
cout << stella. getName() << endl;
cout << stella. getPoints() << endl;
0
// checking name setters and getters
Player stella;
stella. setName("Stella");
cout << stella. getName() << endl;
Stella
// checking points setters and getters
Player stella;
stella. setPoints(13.1);
cout << stella. getPoints() << endl;
13.1
// checking parameterized constructor
Player hector("Hector", 6.2);
cout << hector. getName() << endl;
cout << hector. getPoints() << endl;
Hector
6.2

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best suited for this?
Answers: 2
question
Computers and Technology, 22.06.2019 21:30
Im doing this last minute and literally none of my neighbors or people that my dad works with use excel so if anyone could me make up an example
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
Experimental data that is expressed using numbers is said to be
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe and
Answers: 1
You know the right answer?
Create Player. h and Player. cpp to implement the Player class as described below. You will also nee...
Questions
question
Biology, 20.12.2019 20:31
Questions on the website: 13722361