Lecture 2 UNIT 1 SUNIL KUMAR CITUPES Jan

  • Slides: 6
Download presentation
Lecture 2 (UNIT -1) SUNIL KUMAR CIT-UPES | Jan 2016| © 2012 UPES

Lecture 2 (UNIT -1) SUNIL KUMAR CIT-UPES | Jan 2016| © 2012 UPES

Objectives After completion of this unit, You will be : - § Able to

Objectives After completion of this unit, You will be : - § Able to distinguish the Structured Programming and Object Oriented Programming § Able to implement the problem solutions in Object Oriented Paradigm. § Able to understand the flexibility and modularity provide d by OOPS using C++ § Able to Create of a linked data structure using C++ classes and objects Jan 2016 © 2012 UPES

Difference between OOPS & POP Parameter Procedure Oriented Programming Object Oriented Programming Divided In

Difference between OOPS & POP Parameter Procedure Oriented Programming Object Oriented Programming Divided In POP, program is divided into small In OOP, program is divided into parts Into parts calledfunctions. called objects. Importance In POP, Importance is not given to data but to functions as well as sequence of actions to be done. Approach POP follows Top Down approach. In OOP, Importance is given to the data rather than procedures or functions because it works as a real world. OOP follows Bottom Up approach. Access POP does not have any access specifier. OOP has access specifiers named Specifiers Public, Private, Protected, etc. Data In POP, Data can move freely from Moving function to function in the system. Jan 2016 In OOP, objects can move and communicate with each other through member functions. © 2012 UPES

Difference between OOPS & POP Parameter Procedure Oriented Programming Object Oriented Programming Data Moving

Difference between OOPS & POP Parameter Procedure Oriented Programming Object Oriented Programming Data Moving In POP, Data can move freely from function to function in the system. In OOP, objects can move and communicate with each other through member functions. Expansion To add new data and function in POP is OOP provides an easy way to add new not so easy. data and function. Data Access In POP, Most function uses Global data In OOP, data can not move easily from for sharing that can be accessed freely function to function, it can be kept public from function to function in the system. or private so we can control the access of data. Data Hiding POP does not have any proper way for OOP provides Data Hiding so hiding data so it is less secure. provides more security. Overloading In POP, Overloading is not possible. In OOP, overloading is possible in the form of Function Overloading and Operator Overloading. Examples Example of POP are : C, VB, Example of OOP are : C++, JAVA, FORTRAN, Pascal. VB. NET, C#. NET. Jan 2016 © 2012 UPES

Structure of a C++ Program Jan 2016 © 2012 UPES

Structure of a C++ Program Jan 2016 © 2012 UPES

Difference between OOPS & POP Jan 2016 © 2012 UPES

Difference between OOPS & POP Jan 2016 © 2012 UPES