Filters
Question type

Study Flashcards

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

Correct Answer

verifed

verified

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


A) class furniture[table]:
B) class table.furniture:
C) class furniture(table) :
D) class table(furniture) :

Correct Answer

verifed

verified

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


A) isinstance
B) isclass
C) isobject
D) issubclass

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

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


A) the superclass
B) the subclass
C) the object
D) a 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

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

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

One problem with using a UML diagram is that there is no way to indicate inheritance.

Correct Answer

verifed

verified

False

__________ has the ability to define a method in a subclass and then define a method with the same name in a superclass.


A) Inheritance
B) Encapsulation
C) Polymorphism
D) the 'is a' relationship

Correct Answer

verifed

verified

Given the following beginning of a class definition for a superclass named clock,how many accessor and mutator methods will be needed to complete the class definition? Given the following beginning of a class definition for a superclass named clock,how many accessor and mutator methods will be needed to complete the class definition?   A)  1 mutator, 1 accessor B)  3 mutator, 4 accessor C)  3 mutator, 3 accessor D)  4 mutator, 5 accessor


A) 1 mutator, 1 accessor
B) 3 mutator, 4 accessor
C) 3 mutator, 3 accessor
D) 4 mutator, 5 accessor

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

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


A) Python
B) Course
C) Python(Course)
D) None of these

Correct Answer

verifed

verified

B

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

Correct Answer

verifed

verified

What does a subclass inherit from a superclass?


A) instances and attributes
B) objects and methods
C) methods and instances
D) attributes and methods

Correct Answer

verifed

verified

In an inheritance relationship,a minivan can be thought of as a(n)___________ of the vehicles class.

Correct Answer

verifed

verified

subclass,derived class

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

Correct Answer

verifed

verified

Base classes are also called


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

Correct Answer

verifed

verified

An "is a" relationship exists between a wrench and a tool.

Correct Answer

verifed

verified

Showing 1 - 20 of 36

Related Exams

Show Answer