Inharitance Flashcards

1
Q

What is inheritance

A

A derived class inherits the properties of bass class, object declared in the dried class had access to all public member functions of the base class

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

What is override

A

When a function of a derived class has the same name and parameters as the function in the base class. The derived class is overriding that function

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

What is protected access

A

Allows access to derived classes but no one else

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

What is polymorphism

A

Determining which program hebavioir depending on data type. There are two main types of polymorphism

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

What is compile-time polymorphism

A

Is when the compiler determines which function to call at a comple time

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

What is a runtime polymorphism

A

Is when the complirer is unable to determine which function to call at complie -time , so the determination is made while the program is running

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

What is a virtual function

A

Function that may be overridden in a derived class and used for runtime polymorphism

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

What is static binding

A

Happens at compile time. It’s the link between function and function definition call

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

What is dynamic binding

A

Link cannot be determined until runtime

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

What is a pure vital function

A

Provide no definition in the base class, must be overridden in the derived class

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

What is an abstract base class

A

A class that has one or more pure vital functions, objects off thus class cannot be declared

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

Has a

A

One class may have objects of other class and variable type ( no - inheritance)

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

Is a

A

One class ‘is a ‘ Ty-e of a bas4 class (inhatitance)

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