Inheritance - Concepts QuizJ8 Home « Inheritance - Concepts Quiz

OO Concepts Quiz 6

The quiz below tests your knowledge of the material learnt in OO Concepts - Lesson 6 - Inheritance - Concepts.

Question 1 : What can we check for using the HAS-A test?
- We can check for instance variables using the <code>HAS-A</code> test.
Question 2 : We need to worry about unmatched reference types when using inheritance method invocation?
- We DO NOT need to worry about unmatched reference types when using inheritance method invocation as the compiler has alredy ensured that a method is callable for a specific reference type, regardless of where it is in the inheritance tree.
Question 3 : What are HAS-A relationships based on?
- The <code>HAS-A</code> relationship is based on compostion.
Question 4 : The HAS-A test works up the inheritance tree?
- The <code>HAS-A</code> relationshop works on composition not inheritance.
Question 5 : What are IS-A relationships based on?
- The <code>IS-A</code> relationship is based on inheritance.
Question 6 : The IS-A test works down the inheritance tree?
- The <code>IS-A</code> works UP the inheritance tree.
Question 7 : A superclass knows nothing of the members in the subclasses below it?
- A superclass knows nothing of the members in the subclasses below it.
Quiz Progress Bar Please select an answer


What's Next?

In the next quiz we test your knowledge of using the super keyword to access our superclasses.