Exam 11: Inheritance

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

In a UML diagram depicting inheritance, you only write the name of the subclass.

Free
(True/False)
4.7/5
(35)
Correct Answer:
Verified

False

Of the two classes Cola and Soda, which would most likely be the subclass?

Free
(Multiple Choice)
4.9/5
(42)
Correct Answer:
Verified

A

In an inheritance relationship, the extended class is called the _______________.

Free
(Short Answer)
4.7/5
(33)
Correct Answer:
Verified

subclass

What gives a program the ability to call the correct method depending on the type of object that is used to call it?

(Multiple Choice)
4.8/5
(38)

In the following line of code, what is the name of the base class? Class Male(Human):

(Multiple Choice)
4.9/5
(43)

_____ allows a new class to inherit the members of the class it extends.

(Multiple Choice)
4.8/5
(39)

Examine the following piece of code: Class Potato (Vegetable): In a UML diagram, what would the open arrowhead point to?

(Multiple Choice)
4.8/5
(35)

It is not possible to indicate inheritance in a UML diagram.

(True/False)
4.9/5
(39)

Which method can you use to determine whether an object is an instance of a class?

(Multiple Choice)
4.8/5
(39)

Polymorphism works on any two class methods that have the same name.

(True/False)
4.9/5
(38)

New attributes and methods may be added to a subclass.

(True/False)
4.8/5
(42)

What is the relationship called in which one object is a specialized version of another object?

(Multiple Choice)
4.8/5
(45)

What concept involves a superclass and a subclass?

(Multiple Choice)
4.7/5
(37)

Each subclass has a method named __init__ that overrides the superclass's __init__.

(True/False)
4.8/5
(38)

When a class inherits another class, it is required to use all the data attributes and methods of the superclass.

(True/False)
4.9/5
(33)

Superclasses are also called _______________ classes.

(Short Answer)
5.0/5
(35)

New attributes and methods may be added to a subclass, which makes it a(n) _______________ version of the superclass.

(Short Answer)
4.9/5
(40)

_______________ allows subclasses to have methods with the same names as methods in their superclasses.

(Short Answer)
4.8/5
(33)

A subclass is also called a(n) _______________ class.

(Short Answer)
4.8/5
(37)

What does a subclass inherit from a superclass?

(Multiple Choice)
4.7/5
(32)
Showing 1 - 20 of 35
close modal

Filters

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