Exam 10: Inheritance and Polymorphism

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

A(n) ____________ is a property that appears in a base class but expects to be overridden in a derived class.

(Multiple Choice)
4.8/5
(43)

The ____________ is the general class.

(Multiple Choice)
5.0/5
(40)

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
(32)

The ____________ declares that a method in the derived class overrides a method in the base class.

(Multiple Choice)
4.8/5
(41)

The term ____________ refers to an object's ability to take different forms.

(Multiple Choice)
4.9/5
(42)

Base classes are sometimes called superclasses, and derived classes are sometimes called ____________.

(Multiple Choice)
4.8/5
(38)

New fields, properties, and methods cannot be added to the derived class.

(True/False)
4.8/5
(36)

If a base class object is used to call an overridden method, then the derived class's version of the method is the one that executes.

(True/False)
4.8/5
(40)

To override the property in the ____________ you write the override keyword in the property declaration.

(Multiple Choice)
4.9/5
(32)

When designing an object-oriented program, the best approach is to write a base class to hold all the general data about an object and then write derived classes for each specific type of object.

(True/False)
4.8/5
(38)

If you want to create an abstract read-only property, leave out the set accessor.

(True/False)
4.9/5
(36)

Only methods in the derived class can directly access the base class's private members.

(True/False)
4.7/5
(38)

When you create a derived class, the base class constructor is executed first, and then the derived class constructor is executed.

(True/False)
4.7/5
(30)

A class that is not intended to be instantiated but is to be used only as a base class is called a concrete class.

(True/False)
4.8/5
(31)

The ____________ inherits fields, properties, and methods from the base class without any of them having to be rewritten.

(Multiple Choice)
4.9/5
(43)

If the base class does not have a parameterless constructor, the derived class constructor must use the notation: base(parameterList) to call one of the base class's parameterized constructors.

(True/False)
4.7/5
(33)

When a derived class method has the same name as a base class method, it is often said that the derived class method ____________ the base class method.

(Multiple Choice)
4.9/5
(43)
Showing 21 - 37 of 37
close modal

Filters

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