Computers and Technology

Write the interface (.h file) of a class Player containing: A data member name of type string. A data member score of type int. A member function called setName that accepts a parameter and assigns it to name . The function returns no value. A member function called setScore that accepts a parameter and assigns it to score . The function returns no value.
A member function called getName that accepts no parameters and returns the value of name .
A member function called getScore that accepts no parameters and returns the value of score .
My start code:
class Player
{
string name;
int score;
void setScore (int playerScore)
{
score = playerScore;
}
int getScore()
{
return score;
}
}

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 14:00, allison9746
Need ! will choose brainliest! discuss the role of abstraction in the history of computer software.
Answers: 1
image
Computers and Technology, 23.06.2019 20:40, bobby3350
On nba 2k 19, every time i try to join a my park game, it leads ro a website telling my dad that he needs ps plus. i already have ps plus though. how do i fix this?
Answers: 2
image
Computers and Technology, 24.06.2019 05:30, lolololol21
Cómo pongo un tomo de llamada sin pagar?
Answers: 1
image
Computers and Technology, 24.06.2019 07:40, daebreonnakelly
What type of multimedia are live news feeds? live news feeds are examples of multimedia.
Answers: 2
Do you know the correct answer?
Write the interface (.h file) of a class Player containing: A data member name of type string. A dat...

Questions in other subjects:

Konu
Social Studies, 18.07.2019 00:00