subject

Write the definition of a class player containing:
an instance variable name of type string, initialized to the empty string.
an instance variable score of type int, initialized to zero. a method called setname that has one parameter, whose value it assigns to the instance variable name.
a method called setscore that has one parameter, whose value it assigns to the instance variable score.
a method called getname that has no parameters and that returns the value of the instance variable name.
a method called getscore that has no parameters and that returns the value of the instance variable score.
no constructor need be defined.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:00
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
Experimental data that is expressed using numbers is said to be
Answers: 1
question
Computers and Technology, 23.06.2019 03:50
Iam a bacterium. i cause stomach cramps and diarrhea. i am caused by eating rotten foodssuch as chicken, fish, or eggs. sometimes turtles carry my bacteria.what am i?
Answers: 2
question
Computers and Technology, 23.06.2019 09:10
(328 inc. 448 ind. 480 in25. john has a collection of toy cars. he has 2 red cars, 4 blue cars, 4 black cars, and 6 yellowcars. what is the ratio of red cars to yellow cars? a. 1: 2b. 1: 3c. 1: 626. the net of a right triangular prism is shown below.
Answers: 2
You know the right answer?
Write the definition of a class player containing:
an instance variable name of type string,...
Questions
question
Computers and Technology, 16.11.2019 22:31
Questions on the website: 13722367