Object Oriented Programing
Object Oriented Programing
Abstraction is selecting data from a larger pool to show only the relevant details to the
object. It helps to reduce programming complexity and effort.
The viewed interface is as simple as possible.
Example:
vs
2
Data Abstraction: hiding the details about the data type
Example: Array class
Control (Procedural) Abstraction: hiding implementation details of procedure
from the user.
Example: Abstract class, Interface
3
Abstract class
A class which is declared “abstract” is called as an abstract class. It can have abstract methods and
normal methods. A normal class cannot have abstract methods.
Abstract method
It must be declared in an abstract class, and abstract method not body
4
5
The main benefit of using an abstract class is that it allows you to group several
related classes as siblings.
Abstraction helps to reduce the complexity of the design and implementation
process of software.
6
7