Question: Data hiding, which means that critical data stored inside the object is protected from code outside the object, is accomplished by: Question 4 options: A)
Data hiding, which means that critical data stored inside the object is protected from code outside the object, is accomplished by: Question 4 options: A) Using the private access specifier on the class methods. B) Using proper notation to set access to private on the class fields. C) Using the public access specifier on the class methods. D) Using the private access specifier on the class definition. Question 5 (1 point) Another term for an object of a class is: Question 5 options: A) Method. B) Access specifier. C) Member. D) Instance. Question 6 (1 point) For the following code, which statement is NOT true? public class Circle private radius public x private y Question 6 options: A) y is available to code that is written outside the Circle class. B) radius, x, and y are called fields of the Circle class. C) x is available to code that is written outside the Circle class. D) radius is not available to code written outside the Circle class. Question 7 (1 point) It is common practice in object-oriented programming to make all of a class's: Question 7 options: A) Fields private. B) Methods private. C) Fields and methods public. D) Fields public. Question 8 (1 point) A constructor is a method that: Question 8 options: A) Never receives any arguments. B) With the name ClassName.constructor. C) Performs initialization or setup operations. D) Returns an object of the class.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
