0% found this document useful (0 votes)
43 views

Oop - Module - 1 - Lec - 1

This the module those who want to improve their end term semester exam and learn the skill of the Object- oriented programming using C++ .

Uploaded by

Hj Jord Tzong
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

Oop - Module - 1 - Lec - 1

This the module those who want to improve their end term semester exam and learn the skill of the Object- oriented programming using C++ .

Uploaded by

Hj Jord Tzong
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Object Oriented Programming

Using C++
Course Code : CSE181302
MODULE : 1 : Abstract Data Types
( Lecture – 1 )

Gautam Nath , Assistant Professor


CSE Department
Barak Valley Engineering College , Karimganj

Prepared By - Gautam Nath , Asst Professor , BVEC , Karimganj , Assam 1


Recommended Book
 Object-Oriented Programming with C++,
Balaguruswamy, McGraw Hill Education

Prepared By - Gautam Nath , Asst


Professor , BVEC , Karimganj , Assam 2
Topics for today :
 Basic elements of any program
 Understanding Abstract Data Type
 Concrete Invariant Vs Abstract Function

Prepared By - Gautam Nath , Asst Professor , BVEC , Karimganj , Assam 3


Basic elements of any program
Program Elements

Algorithms Data Structures

Step by step Logical relationship between data


procedure items.

Data organization in the memory

Effective retrieval and manipulation


of data
Prepared By - Gautam Nath , Asst Professor , BVEC , Karimganj , Assam 4
Basic elements … contd
Data Structure

Primitive Data Non Primitive Data


Structure / Primitive Structure / Non
Data Type Primitive Data Type

e.g – int , float , double , e.g – Next Slide


char

Prepared By - Gautam Nath , Asst Professor , BVEC , Karimganj , Assam 5


Basic elements … contd
Non Primitive Data Structure

Linear Data Structure Non Linear Data Structure

data elements are data elements are


sequentially connected hierarchically connected and
and are present at a single are present at various levels.
level.
e.g – Array, queue, stack, e.g – Tree , Graph
linked

Prepared By - Gautam Nath , Asst Professor , BVEC , Karimganj , Assam 6


Understanding Abstract Data Type
(ADT)
 They represent the definitions of data and
their operations but does not include any
implementation details.
 All non primitive data structures come
under the category of ADT.
 They are mathematical or abstract or
logical model.
 Their implementation depends on the
type of programming language chosen.
Prepared By - Gautam Nath , Asst Professor , BVEC , Karimganj , Assam 7
Understanding ADT contd…
Example:

Prepared By - Gautam Nath , Asst Professor , BVEC , Karimganj , Assam 8


Understanding ADT contd…
Astract / Logical Model : Array
Specification :
 Store a set of elements of integer type
 read elements by index position
 modify elements by index position.
 perform sorting.

Implementation :
 int arr[10]={ 25 , 14 , 9 , 38 , 77 , 45 } ;
 cout << arr [ 4 ] ;
 arr [ 5 ] = 20 ;

Prepared By - Gautam Nath , Asst Professor , BVEC , Karimganj , Assam 9


Concrete invariant vs.
abstraction function

 Abstraction function explains how


information within the module is viewed
abstractly by module clients.

 Concrete invariant defines what


concrete data values are valid
representations of abstract values.

Prepared By - Gautam Nath , Asst Professor , BVEC , Karimganj , Assam 10


Concrete invariant vs.
abstraction function…contd

Prepared By - Gautam Nath , Asst Professor , BVEC , Karimganj , Assam 11


Next Class
 Module – 2 : Introduction to OOP and
C++

Prepared By - Gautam Nath , Asst Professor , BVEC , Karimganj , Assam 12

You might also like