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 23:30
What is the digital revolution and how did it change society? what are the benefits of digital media?
Answers: 1
question
Computers and Technology, 23.06.2019 00:20
The open systems interconnection (osi) reference model: defines standards for many aspects of computing and communications within a network. is a generic description for how computers use multiple layers of protocol rules to communicate across a network. defines standards for wireless local area network (wlan) communication protocols. details the advantages and disadvantages of various basic network cabling options.
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What part of the interface displays the external references contained in a selected cell? the status bar the review tab the scroll bar the formula bar
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Which finger presses the h key on the keyboard? index finger on the left hand pinky finger on the right hand index finger on the right hand thumb on the left hand
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
Mathematics, 13.05.2021 19:50