OOP RECAP Flashcards
What is the difference between structured programming and object-oriented programming
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.
What is an object?
An object is an executable copy of a class. It can also be referred to as an instance
What is an attribute?
description of objects in a class
What is a method?
an action performed by an object
What is a class?
a category of similar objects (such as automobiles)
does not hold any values of the object’s attributes
What is encapsulation?
- 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.
What is abstraction?
The process of representing essential features without including background details or explanations / The process of defining the essential concepts while
ignoring the inessential details.
What is polymorphism?
This is the ability to present the same interface for differing underlying forms.
What is inheritance
- 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
List the pure OO languages
Smalltalk, Eiffel, Actor, Java
List the hybrid OO languages
C++, Objective-C, Object-Pascal