Filters
Question type

Study Flashcards

One of the ingredients of polymorphic behavior is the ability to define a method in a subclass, and then define a method with the same name in a superclass.

Correct Answer

verifed

verified

A subclass may not override any method other than the __init__ method.

Correct Answer

verifed

verified

Which of the following is the correct syntax for defining a class dining which inherits from class furniture?


A) class furniture(dining)
B) class dining(furniture)
C) class furniture(dining) :
D) class dining(furniture) :

Correct Answer

verifed

verified

In a UML diagram, what does the open arrowhead point to?


A) Superclass
B) Subclass
C) Object
D) Method

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

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


A) Superclass
B) Subclass
C) Object
D) Method

Correct Answer

verifed

verified

_______________ is used to create an 'is a' relationship among classes.

Correct Answer

verifed

verified

In an inheritance relationship, a television is a(n) _______________ of the electronics class.

Correct Answer

verifed

verified

The _______________ function determines whether an object is an instance of a specific class, or an instance of a subclass of that class.

Correct Answer

verifed

verified

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


A) Rose
B) Flower
C) Either
D) Incorrect code

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

When a subclass method has the same name as a superclass method, it is often said that the subclass method _______________ the superclass method.

Correct Answer

verifed

verified

When there are several classes that have many common data attributes, it is better to write a(n) _____ to hold all the general data.


A) superclass
B) subclass
C) object
D) method

Correct Answer

verifed

verified

Base classes are also called _____.


A) superclasses
B) derived
C) subclasses
D) classes

Correct Answer

verifed

verified

Showing 21 - 35 of 35

Related Exams

Show Answer