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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:40
When the pc version of the spreadsheet program became available, the ibm pc quickly became the top-selling personal computer?
Answers: 3
question
Computers and Technology, 23.06.2019 12:00
Which of these is an example of an integrated presentation? a. a table created in powerpoint b. an image pasted into powerpoint c. a caption created in powerpoint d. an excel chart pasted into powerpoint
Answers: 1
question
Computers and Technology, 24.06.2019 09:00
Technician a says that a new replacement part is always good. technician b says that sometimes recent repair work will be the cause of a complaint. who is correct? a. both technicians a and b b. technician a c. technician b d. neither technician a nor b
Answers: 3
question
Computers and Technology, 24.06.2019 12:00
Match the function to its purpose. fast worth 50pts.
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
question
Mathematics, 09.09.2020 05:01
question
Mathematics, 09.09.2020 05:01
question
Mathematics, 09.09.2020 05:01
question
Mathematics, 09.09.2020 05:01
question
Mathematics, 09.09.2020 05:01
question
Mathematics, 09.09.2020 05:01
question
Mathematics, 09.09.2020 05:01
question
Social Studies, 09.09.2020 05:01
question
Mathematics, 09.09.2020 05:01
question
Mathematics, 09.09.2020 05:01
question
Mathematics, 09.09.2020 05:01
Questions on the website: 13722360