OOP RECAP Flashcards

1
Q

What is the difference between structured programming and object-oriented programming

A

The structured programming allows developing a program using a set of modules or functions. while the object oriented programming allows constructing a program using a set of objects and their interactions.

In structured programming, methods are written globally and code lines are processed one by one i.e., Run sequentially. In object oriented programming, methods work dynamically, making calls as per need of code for certain time.

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

What is an object?

A

An object is an executable copy of a class. It can also be referred to as an instance

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

What is an attribute?

A

description of objects in a class

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

What is a method?

A

an action performed by an object

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

What is a class?

A

a category of similar objects (such as automobiles)

does not hold any values of the object’s attributes

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

What is encapsulation?

A
  • This is a concept that enables the hiding unnecessary details in classes and only providing a clear and simple interface for working with them.
  • It is also called information hiding.
  • An object must provide its users only with the essential information for manipulation, without the internal details.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is abstraction?

A

The process of representing essential features without including background details or explanations / The process of defining the essential concepts while
ignoring the inessential details.

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

What is polymorphism?

A

This is the ability to present the same interface for differing underlying forms.

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

What is inheritance

A
  • Inheritance is a concept in OOP that enables new objects to take on the properties of existing objects.
  • Object-oriented programming allows classes to ASSUME commonly used state and behavior from other classes.
  • Inheritance is an “is a” relationship eg a dog is a animal; therefore it inherits the characteristics common to animals
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

List the pure OO languages

A

Smalltalk, Eiffel, Actor, Java

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

List the hybrid OO languages

A

C++, Objective-C, Object-Pascal

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