Pillars of Object Oriented Programming Flashcards

1
Q

What is Object Oriented Programming?

A

A way of organising software design around real world objects

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

How does it do this?

A

By using classes and objects

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

What is a class?

A

A class is like a blue print for real world object that is made up of it’s own properties like data and functionality.

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

What is an object?

A

This is an instance of a class

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

What is the main benefit of OOP?

A

It promotes code reusability

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

What are the 4 Pillars of OOP?

A

Abstraction

Encapsulation

Inheritance

Polymorphism

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

What is Abstraction?

A

Abstraction is about only showing what is necessary

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

What is Encapsulation?

A

Encapsulation is about hiding complexity

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

What is Inheritance?

A

Inheritance allows an object to inherit properties of it’s parent

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

.What is Polymorphism?

A

Polymorphism allows objects to occur in many forms

ie Animal base class, with Dog, Cow, Cat etc.. all having makeNoise()

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

How is Abstraction achieved in C#

A
  • Encapsulation
  • Abstract classes
  • Interfaces
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How is Encapsulation achieved in C#

A

Using access modifiers like public, private etc…

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

How is Inheritance achieved in C#

A

By creating derived classes or multiple interfaces

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

How is Polymorphism achieved in C#

A

Method and operator overloading

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