Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a new file: player.h that declares the Player class Requires a macro or include guard Create a new file: player.cpp that implements all the
Create a new file: player.h that declares the Player class
Requires a macro or include guard
Create a new file: player.cpp that implements all the Player class definitions
A Player has a:
name single one word name as a std::string
score as an integer
A Player performs the following functionality and behaviors:
default constructor and other constructor
accessor getters member functions constant member functions
getName
getScore
modifiers setters member functions
setName
setScore
other member functions:
std::string toString const; returns a string formatting the data to display to the user
it does NOT get input from the user. NO std::cin or std::cout
this is a constant function that formats the data to display to later display to the console window
std::string toFileString const; returns a string formatted data as a comma delimited Record ie name,score
it does NOT read from the file. NO std::ifstream or std::ofstream
this is a constant function that formats the data to write later to a file
Make sure to follow the Program Rubric posted to DL More Tools Rubric
The assignment MUST be submitted to turn it in
Note any comments left from students will not be viewed until the instructor pools feedback andor when the instructor is grading the assignment. Students should contact the instructor directly via email with any questions
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started