Exam 9: Inheritance

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

If a class has an abstract method, which of the following statements is NOT true?

(Multiple Choice)
4.9/5
(34)

Which of the following statements about abstract methods is true?

(Multiple Choice)
4.8/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)
5.0/5
(41)

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

(Multiple Choice)
4.9/5
(42)

The term for a class from which you cannot create objects is

(Multiple Choice)
4.9/5
(27)

Consider the following code snippet: Consider the following code snippet:      You wish to create a concrete subclass named PolisherHachine. Which of the following is the correct way to declare this subclass? You wish to create a concrete subclass named PolisherHachine. Which of the following is the correct way to declare this subclass?

(Multiple Choice)
4.9/5
(32)

Consider the following class hierarchy: Consider the following class hierarchy:   Complete the code in this program snippet to correctly display the auto's type. Complete the code in this program snippet to correctly display the auto's type.

(Multiple Choice)
4.8/5
(32)

When the reserved word super is followed by a parenthesis, what does it indicate?

(Multiple Choice)
4.8/5
(38)

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

(Multiple Choice)
4.7/5
(43)

Which of the following is true regarding subclasses?

(Multiple Choice)
4.9/5
(36)

Consider the following class hierarchy: Consider the following class hierarchy:   Complete the code in the Auto class method named displayAutoType to return the type data. Complete the code in the Auto class method named displayAutoType to return the type data.

(Multiple Choice)
4.9/5
(43)

To test whether an object belongs to a particular type, use

(Multiple Choice)
4.9/5
(40)

Which of the following is true regarding subclasses?

(Multiple Choice)
5.0/5
(44)

All rodents are mammals and all canines are mammals.No canines are rodents and no rodents are canines.What hierarchy best captures this information?

(Multiple Choice)
4.9/5
(37)

Which of the following is true regarding subclasses?

(Multiple Choice)
5.0/5
(35)

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

(Multiple Choice)
4.8/5
(29)

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

(Multiple Choice)
4.8/5
(34)

Consider the following code snippet, which is meant to override the equals() method of the Object class: Consider the following code snippet, which is meant to override the equals() method of the Object class:   What is wrong with this code? What is wrong with this code?

(Multiple Choice)
4.8/5
(38)

Consider the following code snippet: Consider the following code snippet:   Assume that the Auto class inherits from the Vehicle class, and neither class has an implementation of the toString() method.Which of the following statements is correct? Assume that the Auto class inherits from the Vehicle class, and neither class has an implementation of the toString() method.Which of the following statements is correct?

(Multiple Choice)
4.8/5
(35)

Consider the following class hierarchy: Consider the following class hierarchy:   Complete the code in the Auto class constructor to store the type data. Complete the code in the Auto class constructor to store the type data.

(Multiple Choice)
4.9/5
(39)
Showing 61 - 80 of 99
close modal

Filters

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