Chapter 28.2 Flashcards

(23 cards)

1
Q

Abstraction

A

the mechanism and practice through which details can be reduced and factored out so that one can focus on a few concepts at a time.

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

Encapsulation

A

the packaging of data fields and behaviours into a single unit (class) so that implementation details are hidden

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

Inheritance

A

-Classes can exist in a hierarchical structure where classes higher up are more general and classes lower down are more specific

-A way to form new classes, using classes that have already been defined.
Inheritance is employed to reuse existing code with little or no modification.

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

Types of inheritance

A

-Single inheritance
-Multiple inheritance
-Hierarchical inheritance
-Multilevel inheritance
-Hybrid inheritance
-Implicit inheritance

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

Single inheritance

A

Inheritance from a single base class

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

Multiple inheritance

A

When a class inherits from more than one parent class

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

Hierarchical inheritance

A

When a base class has more than one subclasses

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

Multilevel inheritance

A

Inheritance from a class thats already inheriting from another class

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

Hybrid inheritance

A

A combination of inheritance types

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

Implicit inheritance

A

all classes in C# inherits from the System.Object
class and its derived classes and therefore inherit its members, such as ToString().

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

Polymorphism

A

The ability of a program to detect the actual class of an object and call its implementation even when it is declared as in instance of a parent or abstract class or interface.

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

Static polymorphism

A

-It is decided at compile time

-It is achieved with method overloading

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

Dynamic polymorphism

A

-It is decided at run time

-It is achieved with method overriding

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

Types Access modifiers

A

-Private
-Protected
-Internal
-Protected internal
-Public

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

Private

A

Access is restricted to the same class where the member is defined.

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

Protected

A

Accessible from within the class where it is defined and in all classes that inherits from that class

17
Q

Internal

A

Accessible from anywhere in the assembly

18
Q

Protected internal

A

Accessible from anywhere in the same assembly as well as derived classes in another assembly.

19
Q

Public

A

Accessible from anywhere in the system

20
Q

A property

A

A private data field with one or two private or public methods and the so called getter and setter (accessors):

21
Q

Composition

A

occurs when the contained object has right of existence only when it is part of the container

22
Q

Aggregation

A

A special type of association where the instance of the client class can contain one or more instances of another class

23
Q

An association

A

A relationship between two (or more) types that are linked by an instance(s).