Exam 9: Inheritance

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

You can write a super statement that calls a superclass constructor, but only in the subclass's constructor.

(True/False)
4.7/5
(43)

If ClassC is derived from ClassB, which is derived from ClassA, this would be an example of

(Multiple Choice)
5.0/5
(37)

In object-oriented programming, ________ allows you to extend the capabilities of a class by creating another class that is a specialized version of it.

(Multiple Choice)
4.9/5
(45)

Which of the following statements declares Salaried as a subclass of PayType?

(Multiple Choice)
4.8/5
(33)

If a method in a subclass has the same signature as a method in the superclass, the subclass method ________ the superclass method.

(Multiple Choice)
4.8/5
(37)

You can use this operator to determine whether an object is an instance of a particular class.

(Multiple Choice)
4.8/5
(31)

In ________, inheritance is shown with a line that has an open arrowhead at one end that points to the superclass.

(Multiple Choice)
4.9/5
(37)

A ________ member's access is somewhere between private and public.

(Multiple Choice)
4.8/5
(37)

When an "is a" relationship exists between objects, it means that the specialized object has all of the characteristics of the general object, plus additional characteristics that make it special.

(True/False)
4.9/5
(35)

A protected member of a class may be directly accessed by

(Multiple Choice)
4.9/5
(46)

A class becomes abstract when you place the ________ key word in the class definition.

(Multiple Choice)
4.7/5
(31)

When one object is a specialized version of another object, there is this type of relationship between them.

(Multiple Choice)
5.0/5
(36)

In a UML diagram, you show a realization relationship by connecting a class and an interface with a

(Multiple Choice)
4.8/5
(37)

This key word indicates that a class inherits from another class.

(Multiple Choice)
4.9/5
(33)

When a method is declared with the ________ modifier, it cannot be overridden in a subclass.

(Multiple Choice)
4.8/5
(28)

An abstract class is not instantiated itself, but serves as a superclass for other classes.

(True/False)
4.8/5
(38)

When an "is a" relationship exists between objects, it means that the specialized object has

(Multiple Choice)
4.8/5
(44)

Which of the following statements correctly specifies two interfaces?

(Multiple Choice)
4.9/5
(40)

You show inheritance in a UML diagram by connecting two classes with a line that has an open arrowhead that points to the subclass.

(True/False)
4.8/5
(30)

If you do not provide an access specifier for a class member, the class member is given ________ access by default.

(Multiple Choice)
4.9/5
(36)
Showing 21 - 40 of 40
close modal

Filters

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