Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Only those class members which are part of the interface of the class should

ID: 3530974 • Letter: 1

Question

1. Only those class members which are part of the interface of the class should be declared as _____. (Points : 2) a. open b. banned c. private d. public 2. A private attribute can have an associated public _____ to allow an outside class to retrieve its value. (Points : 2) a. constructor b. destructor c. getter d. mutator 3. Which of the following statements is/are false? (Points : 2) a. If a method is public, it is considered part of the class interface. b. One goal regarding the implementation of a class should be kept in mind: a change to the implementation should not require a change to the user

Explanation / Answer

1 b. banned

2 d. mutator


3 c. If you declare an attribute as public, you do not have to worry about tracking down every piece of code that might have changed the attribute when debugging.

4 e. Only A and C