If A "Is-A" B, what else can we say about the relationship between class A and class B?
| Class A inherits from class B |
| Class A derives from class B. |
Flag this Question
Question 21 pts
What tool is used to show inheritance or composition relationships among classes.
Flag this Question
Question 31 pts
Which of the following is a specialized version of a class.
Flag this Question
Question 41 pts
Which of the following statements is true?
| Objects NEVER change the class to which they belong. |
| In some situations, a variable may be bound to DIFFERENT types of objects. |
| The behavior of any object is determined by the OBJECT'S CLASS and not by the data type of the variable that references it. |
Flag this Question
Question 51 pts
Given this start to a class definition: public class Beta extends Alpha { ... } What is true about instance variables from Alpha?
| Class Beta must redeclare all of Alpha's instance variables. |
| They should not be redeclared in Beta. |
| The Beta class should redeclare only those instance variables from Alpha that it wants. |
| Class Beta should redeclare only the private instance variables from Alpha. |
Flag this Question
Question 61 pts
If class Fruit is the superclass of class Apple, which of the following is also true?
| Fruit is the base class of Apple |
| Fruit is the parent class of Apple |
Flag this Question
Question 71 pts
If a class definition does not include the keyword extends, which of the following is true?
| The class has no sub class |
| The class has no super class |
| The class implicitly derives from Class. |
| The class implicitly derives from Object. |
Flag this Question
Question 81 pts
Which of the following things would prevent a method declaration in a subclass from properly overriding an inherited method?
| not matching the method name |
| not matching the return type |
| not matching the parameter "signature" (number, order and data types of parameters) |
| trying to make a public method private |
Flag this Question
Question 91 pts
What is always the very first thing that occurs in the constructor of a derived class?
| instance variables are initialized |
| the value true is returned |
| a call to the superclass constructor is made |
Flag this Question
Question 101 pts
Which of the following statements creates a composition (or aggregation) relationship?
| public class Fun extends Hun { ... } |
| if ( myThing instanceof Point ) { ... } |