Exam 9: Inheritance

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

When declared as protected, which statement is true about the access to data in an object?

(Multiple Choice)
4.8/5
(40)

Consider the hierarchy of classes shown below. Consider the hierarchy of classes shown below.   What is the direct superclass of the class ScriptedShow? What is the direct superclass of the class ScriptedShow?

(Multiple Choice)
4.8/5
(34)

Consider the following code snippet: Consider the following code snippet:   What does this code do? What does this code do?

(Multiple Choice)
4.7/5
(40)

Consider the following inheritance hierarchy diagram: Consider the following inheritance hierarchy diagram:   Which of the following statements is correct? Which of the following statements is correct?

(Multiple Choice)
4.8/5
(25)

You are creating a Motorcycle class which is supposed to be a subclass of the Vehicle class.Which of the following class declaration statements will accomplish this?

(Multiple Choice)
4.8/5
(34)

Consider the following code snippet: Consider the following code snippet:   Which of the following statements is correct? Which of the following statements is correct?

(Multiple Choice)
4.9/5
(36)

Which of the following statements about comparing objects is correct?

(Multiple Choice)
4.8/5
(35)

Consider the Counter class below. Consider the Counter class below.

(Multiple Choice)
4.8/5
(30)

Consider the following code snippet: Consider the following code snippet:   Which of the following statements is correct? Which of the following statements is correct?

(Multiple Choice)
4.9/5
(31)

Consider the classes shown below: Consider the classes shown below:

(Multiple Choice)
4.7/5
(36)

All hamsters are rodents and all rodents are mammals.What hierarchy best captures this information?

(Multiple Choice)
4.9/5
(38)

Which of the following statements is true about using the reserved word super to call a superclass constructor?

(Multiple Choice)
4.8/5
(35)

In designing an inheritance hierarchy it is helpful first to list classes that are part of the hierarchy and then organize those classes via an inheritance diagram.Once this has been done, what is the next step in the design?

(Multiple Choice)
4.8/5
(37)

Insert the missing code in the following code fragment.This fragment is intended to call the Vessel class's method. Insert the missing code in the following code fragment.This fragment is intended to call the Vessel class's method.

(Multiple Choice)
4.8/5
(37)

Which class represents a more specific entity in an inheritance hierarchy?

(Multiple Choice)
4.8/5
(35)

Consider the following class hierarchy: Consider the following class hierarchy:   What is wrong with this class hierarchy definition? What is wrong with this class hierarchy definition?

(Multiple Choice)
4.8/5
(43)

Which of the following is true regarding inheritance?

(Multiple Choice)
4.8/5
(36)

To ensure that an instance variable can only be accessed by the class that declared it, how should the variable be declared?

(Multiple Choice)
4.9/5
(42)

Consider the following code snippet: Consider the following code snippet:   Which of the following statements is correct? Which of the following statements is correct?

(Multiple Choice)
4.8/5
(38)

Consider the following code snippet: Consider the following code snippet:   Which of the following statements is correct? Which of the following statements is correct?

(Multiple Choice)
4.9/5
(48)
Showing 41 - 60 of 99
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)