Edit Game
Accessor & Mutator Methods
 Delete

Use commas to add multiple tags

 Private  Unlisted  Public



 Save

Delimiter between question and answer:

Tips:

  • No column headers.
  • Each line maps to a question.
  • If the delimiter is used in a question, the question should be surrounded by double quotes: "My, question","My, answer"
  • The first answer in the multiple choice question must be the correct answer.






 Save   15  Close
You should declare all instance variables as ____________________.
private
What is the return type of getModelName() method?
String
How many accessor methods do you see in the code segment above?
2
True or False: setVehicleAttributes is an accessor method.
False
True or False: The coinName variable can be accessed only by methods of the Coin class.
True
The process of hiding object data and providing methods for data access is called ______________________.
encapsulation
How many parameters does the getDay() method have?
0
Consider the above code segment. What is the return type of the getDay() method?
int
How many instance variables are created in the code segment above?
3
Given class Counter above, what is the type of getValue() method in the code segment? (accessor or mutator)
accessor
Name the instance methods that are available in class Counter.
getValue() and count()
Given class Counter above, what is the type of count() method in the code segment? (accessor or mutator)
mutator
Given class Counter above, how many instance methods are created in the code segment?
1
Given class Counter above, how many instance variables are created in the code segment?
1
Given class Counter above, how many instances of the Counter class are created in the code segment?
2