Filters
Question type

Study Flashcards

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

Correct Answer

verifed

verified

False

What concept involves a superclass and a subclass?


A) Polymorphism
B) Inheritance
C) Encapsulation
D) Methods

Correct Answer

verifed

verified

Superclasses are also called _______________ classes.

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

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


A) Potato
B) Vegetable
C) class
D) Potato(Vegetable)

Correct Answer

verifed

verified

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


A) Polymorphism
B) Inheritance
C) Encapsulation
D) Methods

Correct Answer

verifed

verified

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


A) Male
B) Human
C) Either
D) Incorrect code

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

subclass

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

Correct Answer

verifed

verified

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


A) Parent-child
B) Node
C) Is a
D) Class

Correct Answer

verifed

verified

What does a subclass inherit from a superclass?


A) Instances and attributes
B) Data and methods
C) Methods and instances
D) Attributes and methods

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

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


A) Cola
B) Soda
C) Both
D) Either

Correct Answer

verifed

verified

A

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

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

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


A) Encapsulation
B) Domain
C) Methods
D) Inheritance

Correct Answer

verifed

verified

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

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) isinheritance

Correct Answer

verifed

verified

New attributes and methods may be added to a subclass.

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

Showing 1 - 20 of 35

Related Exams

Show Answer