Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 1.42 KB

Other_concepts.md

File metadata and controls

7 lines (4 loc) · 1.42 KB

Data Abstraction - Data Abstraction is the process of providing only the essential information, while hiding all the background details. It creates black boxes for the certain processes, so that the user doesn't know the intricate details of what is happening. In OOP, it is implemented through functions. Creating a function, the user doesn't know what commands constitute the function, but can use it for the requisite tasks.

Encapsulation - The property of wrapping up data values and functions into a single unit, such that all of them are related to each other and serve a common functionality. It is implemented in OOP through class. Thus, class forms a blueprint and wraps up various related functions and data values.

Polymorphism - The property of a function to exhibit different behaviour under different circumstances is called Polymorphism. It is usually implemented through function overloading. Suchh functions, having the same name, behave differently when different parameters are passed to it.

Composition - The principle that classes should achieve polymorphic behavior and code reuse by their composition (by containing instances of other classes that implement the desired functionality) rather than inheritance from a base or parent class. To favor composition over inheritance is a design principle that gives the design higher flexibility - it is better to compose what an object can do (HAS-A) than extend what it is (IS-A).