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 07:00
For all machines-not just hammers- the user applies force force to the machine to the machine over a certain distance. a. input b. output c. duo d. none of the above
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Uget brainliest if accurate mary has been given the responsibility of hiring a person for the position of a software testing officer. which management function would mary achieve this responsibility?
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
Afashion designer wants to increase awareness about her brand. which network can she use and why she can use the blank to blank her products online. answers for the first blank: internet, extranet, or intranet answers for the second blank: market, design, and export
Answers: 1
question
Computers and Technology, 24.06.2019 02:00
What is a loop? a. a collection of function definitions at the top of a program b. a line of code that defines a variable and assigns it a value c. a program that opens the turtle graphics window d. a block of code that repeats a specific number of times
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
Social Studies, 05.07.2019 02:30
question
Mathematics, 05.07.2019 02:30
question
Chemistry, 05.07.2019 02:30
question
Mathematics, 05.07.2019 02:30
question
Chemistry, 05.07.2019 02:30
question
Mathematics, 05.07.2019 02:30
Questions on the website: 13722361