subject

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;
}
}

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:00, Trumpman137
Which option marks all modification made within a document? review comment track changes balloons
Answers: 1
image
Computers and Technology, 22.06.2019 23:00, brookerebman15
Which type of tab stop is most for weights and measurements?
Answers: 1
image
Computers and Technology, 23.06.2019 10:30, tommyaberman
Would a ps4 wired controller work on an xbox one
Answers: 1
image
Computers and Technology, 24.06.2019 00:30, louie8656
Match the sentence fragment in the first column with the appropriate ending in the second column. a little per favore?
Answers: 1
You know the right 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
Mathematics, 19.09.2021 14:00
Konu
Social Studies, 19.09.2021 14:00
Konu
Social Studies, 19.09.2021 14:00
Konu
Chemistry, 19.09.2021 14:00