Exam 11: Inheritance

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

New attributes and methods may be added to a subclass.

(True/False)
4.7/5
(33)

Of the two classes,Cherry and Flavor,which would most likely be the subclass?

(Multiple Choice)
4.7/5
(44)

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

(Multiple Choice)
4.9/5
(37)

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

(Short Answer)
4.8/5
(35)

In a UML diagram,a line with an open arrowhead from a subclass to a superclass indicates ___________.

(Short Answer)
4.7/5
(38)

In an inheritance relationship,what is a specialized class called?

(Multiple Choice)
4.9/5
(42)

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

(True/False)
4.7/5
(37)

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

(True/False)
4.8/5
(36)

Given the following line of code,in a UML diagram,what would the open arrowhead point to? Class Celery(Vegetable):

(Multiple Choice)
4.8/5
(43)

When a subclass method has the same name as a superclass method,the subclass method __________ the superclass method.

(Short Answer)
4.9/5
(25)

An "is a" relationship exists between a grasshopper and a bumblebee.

(True/False)
5.0/5
(30)

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

(Multiple Choice)
4.8/5
(37)

In the following line of code,what is the name of the subclass? Class Rose(Flower):

(Multiple Choice)
4.9/5
(41)

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

A superclass inherits attributes and methods from its subclasses without any of them having to be rewritten.

(True/False)
4.9/5
(47)

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

(Short Answer)
4.8/5
(30)
Showing 21 - 36 of 36
close modal

Filters

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