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.8/5
(75)

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

(Multiple Choice)
4.7/5
(86)

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

(Multiple Choice)
4.9/5
(84)

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

(Short Answer)
4.8/5
(85)

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

(Short Answer)
4.7/5
(76)

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

(Multiple Choice)
4.9/5
(90)

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

(True/False)
4.7/5
(74)

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

(True/False)
4.8/5
(79)

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

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

(Short Answer)
4.9/5
(67)

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

(True/False)
5.0/5
(68)

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

(Multiple Choice)
4.9/5
(88)

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

(Multiple Choice)
4.8/5
(75)

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

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

(True/False)
4.9/5
(93)

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

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

Filters

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