0% found this document useful (0 votes)
1K views8 pages

C++ Lecture 4 Apni Kaksha

This document discusses object oriented programming concepts. It defines programming paradigms and describes procedural programming, object based programming, and object oriented programming. The key concepts of OOP are discussed, including abstraction, encapsulation, modularity, inheritance, and polymorphism. Advantages of OOP include code reusability, ease of comprehension and maintenance. Disadvantages include artificial class relationships and requiring good design skills. Practice questions are provided to test understanding of procedural vs OOP and defining OOP concepts.

Uploaded by

sonkar 7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views8 pages

C++ Lecture 4 Apni Kaksha

This document discusses object oriented programming concepts. It defines programming paradigms and describes procedural programming, object based programming, and object oriented programming. The key concepts of OOP are discussed, including abstraction, encapsulation, modularity, inheritance, and polymorphism. Advantages of OOP include code reusability, ease of comprehension and maintenance. Disadvantages include artificial class relationships and requiring good design skills. Practice questions are provided to test understanding of procedural vs OOP and defining OOP concepts.

Uploaded by

sonkar 7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Lecture-2

Object Oriented Programming


Various Programming Paradigms, OOP concepts, Basic Concepts of OOP,
Implementing OOP Concepts in C++, Advantages & Disadvantages of OOP
Programming Paradigms
A programming paradigm defines the methodology of designing and implementing programs
using the key features and other building blocks (such as keywords & functions) of a
programming language.

They refer to the way of implementing and writing the program.


There are 3 paradigms in our syllabus :



Procedural Programming [BASIC, C, FORTRAN]
In Procedural Programming , our main focus is on the procedure rather than data.
We don’t care about the data used in the program, our main motive is to make
the program run faster and effectively.
e.g. If we want to make a program that tells us about the average marks of a
student in 5 subjects in a school.
Our focus will be on how to calculate that faster and without using much
memory.
* We don’t care about storing and organising the marks class-wise or about the
representation of the program.

Design change and upgradation are difficult.


Some methods to focus on Data
● Data Abstraction : showing only necessary parts of the program.
● Data Encapsulation : binding of data into a single capsule (class).
● Modularity : partitioning the program into individual components.
● Inheritance : making a father-son relation between two class
● Polymorphism : processing data in more than one form
Object Based Programming[ RUBY, C# ]

Programming Paradigm in which Abstraction, Encapsulation and Modularity are


used are Object Based Programming.

Which further basically means use of CLASSES.


*Object Oriented Programming[ C++, JAVA, SIMULA]

Programming Paradigm in which Abstraction, Encapsulation,Modularity ,Inheritance and


Polymorphism are used are Object Oriented Programming.

Which means use of class, inheritance and overloading all are supported.
Advantages & Disadvantages of OOP
● Re-use of Code
● Ease of Comprehension ( Similar to real world models )
● Ease of fabrication and maintenance
● Easy Redesign and extension
➔ Relation in classes becomes artificial sometimes
➔ OOP design is tricky
➔ Requires good design, programming & thinking in terms of object skills
Practice Questions
( V.V. Important )
1. **Difference between Procedural Programming & Object Oriented Programming.
2. **Discuss major OOP concepts briefly.
3. Define the following : -
a. Data Abstraction/Hiding
b. Data Encapsulation/Binding
c. Polymorphism
d. Inheritance
e. Modularity

You might also like