04 Inheritance, Polymorphism, and Interfaces Flashcards

1
Q

It enables the use of existing class to define a new class.

A

Inheritance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Is is defined by adding instance variables and methods to an existing class.

A

Derived class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The derived class is also known as? (3)

A

subclass, child class, and descendant class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The existing class that the derived class is built upon.

A

Base class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The base class is also known as? (3)

A

superclass, parent class, and ancestor class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A derived class is defined by starting with another defined class and by adding methods and instance variables. True or False?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A derived class has its own constructors. It does not inherit any constructors from the base class. True or False?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Keyword that is used that the default constructor that calls another in that class?

A

this

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A constructor can contain both super and this keyword.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

It is the ability of an object to take on many forms.

A

Polymorphism

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

It allows many meanings to be associated to one method name?

A

Dynamic Binding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

It is used to specify methods that a class must implement. It contains headings for a number of public methods.

A

Interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

An abstract class can be instantiated. True or False?

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

An abstract class should always have an abstract method.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

It serves as a base class for subclasses. It may or may not include abstract methods.

A

Abstract class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Interfaces can be instantiated. True or False?

A

False