Abstraction
Abstraction
Introduction
Advantages:
● One can use an object without knowing
its details.
● We can distinguish between what a
program does and what it can be
implemented.
Introduction
Abstraction is of two types:
● Process Abstraction
● Data abstraction
Introduction
Process Abstraction
● Process abstraction is an action of computation
in a set of input objects and output objects
produced.
● Subprogram has its name,declaration,procedure
and functions
● A subprogram act as Black box. The details are
hidden from outside world.
● Program has 3 sections:Input,Process,Output
Introduction
Information hiding
Introduction
Information hiding
Advantages
● Easy to understand
● Portable
● Secure
● Only essential info is visible
● Changes is restricted to small subset of
total program
Introduction
Encapsulation
Advantages:
●Easy modification
●Access control to entities
●Organize a program in such away that it
limits recompilation
Introduction
Abstract data type
Properties:
●It export a type.
●It has a set of operations.
●Precondition define the application domain
of type.
Introduction
Abstract Data Type and Object Orientation
Overview of Management
Subprograms
Characteristics:
Advantages:
●Re usability
●Extensibility
●Modularity
●Maintainability
●Abstraction
Overview of Management
Procedure and Function
Specification Var
procedure add; x : integer ;
y : integer ;
var
x : integer ; Procedure add ( a : integer
y : integer ; ; b : integer );
begin begin
BODY write ( a + b );
read ( x , end;
y );
write ( x + y BEGIN
); x = 10 ;
end; y=5;
add ( 10 , 5 ) ;
Overview of Management
Function
Overview of Management
Overloaded subprograms
Advantages:
Overview of Management
Generic Subprogram
A generic or polymorphic subprogram is one that takes parameters
of different types on different activations.
Overview of Management