Campusify – Notes for MSBTE Diploma
Priority-Based | Topic-Wise | Exam-Oriented
1.1 Procedure-Oriented Programming (POP) vs. Object-
Oriented Programming (OOP)
Procedure-Oriented Programming (POP)
Definition
Procedure-Oriented Programming (POP) is a programming approach in which a
program is divided into functions. The primary focus is on procedures (functions) rather
than data.
Approach
Top-down approach is used in program design.
Theory
In the procedure-oriented approach, a problem is viewed as a sequence of tasks such as
reading, calculating, and printing. To perform these tasks, the program is divided into
several functions.
POP mainly focuses on developing functions, while less attention is given to the data
used by those functions.
In large programs, important data is often declared as global data, allowing multiple
functions to access and modify it. As a result:
• It becomes difficult to identify which function is using which data.
• Any modification to the data structure requires changes in all related functions.
• This increases the possibility of errors (bugs).
Therefore, data remains exposed, making POP less secure.
⚠️Note: Unauthorized sharing, distribution, or reproduction of this PDF is illegal. This material is licensed
for individual use only and must not be shared with others.
Campusify – Notes for MSBTE Diploma
Priority-Based | Topic-Wise | Exam-Oriented
Real-Life Example
Writing a program in POP is like following a cooking recipe, where each step is performed
one after another.
Another example is a traditional library, where books are left on open tables. Anyone can
access, modify, or misplace them because there are no restrictions.
Characteristics
• Program is divided into functions.
• Focuses on functions.
• Data is shared globally.
• Uses a top-down approach.
• Less secure.
• Limited code reusability.
Object-Oriented Programming (OOP)
Definition
Object-Oriented Programming (OOP) is a programming approach in which a program is
divided into objects. The main focus is on data (objects) rather than procedures.
Approach
Bottom-up approach is used in program design.
Theory
Object-Oriented Programming organizes programs around objects, where each object
contains both data and the functions that operate on that data.
Since objects are independent, they can be reused in different programs without major
modifications.
⚠️Note: Unauthorized sharing, distribution, or reproduction of this PDF is illegal. This material is licensed
for individual use only and must not be shared with others.
Campusify – Notes for MSBTE Diploma
Priority-Based | Topic-Wise | Exam-Oriented
OOP closely binds data with its related functions, protecting it from unauthorized access or
accidental modification.
Real-Life Example
Object: Car
Properties (Data):
• Color
• Brand
• Speed
Behaviors (Functions):
• Start()
• Stop()
• Brake()
Characteristics
• Program is divided into objects.
• Focuses on data.
• Data is secure through data hiding.
• Uses a bottom-up approach.
• High code reusability.
• Easy to maintain.
POP vs. OOP
Feature POP OOP
Approach Top-down approach Bottom-up approach
Focus Functions (procedures) Objects and data
⚠️Note: Unauthorized sharing, distribution, or reproduction of this PDF is illegal. This material is licensed
for individual use only and must not be shared with others.
Campusify – Notes for MSBTE Diploma
Priority-Based | Topic-Wise | Exam-Oriented
Security Less secure More secure through data hiding
Feature POP OOP
Data is accessible to functions Data is hidden using access modifiers
Data Handling
Scalability Suitable for small programs Suitable for large applications
Communication Through parameter passing Through message passing
Code Reusability
Limited High (Inheritance, Polymorphism)
Functions are more important
Importance Data is more important
Overloading Not supported Supported (language-dependent)
Remember:
"POP tells the computer what to do, while OOP tells the object what it should
do."
1.2 Features of Object-Oriented Programming, Object-
Oriented Languages, and Applications of OOP
Features of Object-Oriented Programming
The six main features of OOP are:
• Class
• Object
• Encapsulation
• Data Abstraction
• Inheritance
⚠️Note: Unauthorized sharing, distribution, or reproduction of this PDF is illegal. This material is licensed
for individual use only and must not be shared with others.
Campusify – Notes for MSBTE Diploma
Priority-Based | Topic-Wise | Exam-Oriented
• Polymorphism
⚠️Note: Unauthorized sharing, distribution, or reproduction of this PDF is illegal. This material is licensed
for individual use only and must not be shared with others.
Campusify – Notes for MSBTE Diploma
Priority-Based | Topic-Wise | Exam-Oriented
1. Class
Definition: A class is a blueprint or template used to create objects.
Example: Class: Student
Data Members: Name, Roll No., Marks
2. Object
Definition: An object is a real instance of a class.
Example: Student s1;
Here, Student → Class, s1 → Object
Real-Life Example: Class: Mobile → Objects: Samsung, Vivo, iPhone
3. Encapsulation
Meaning: Encapsulation is the process of wrapping data and functions together into a
single unit (class).
Example:
class Student
{
int roll;
void display();
};
Here, both data and functions are enclosed within the same class.
4. Data Abstraction
Meaning: Data abstraction means showing only the necessary information while hiding the
implementation details.
⚠️Note: Unauthorized sharing, distribution, or reproduction of this PDF is illegal. This material is licensed
for individual use only and must not be shared with others.
Campusify – Notes for MSBTE Diploma
Priority-Based | Topic-Wise | Exam-Oriented
Example: ATM Machine
⚠️Note: Unauthorized sharing, distribution, or reproduction of this PDF is illegal. This material is licensed
for individual use only and must not be shared with others.
Campusify – Notes for MSBTE Diploma
Priority-Based | Topic-Wise | Exam-Oriented
User only enters: Card, PIN, Amount. The internal processing remains hidden.
5. Inheritance
Meaning: Inheritance is the process by which one class acquires the properties and
methods of another class.
Example: Animal → Dog
Dog inherits: Eat(), Sleep(). Dog can also have its own function: Bark()
6. Polymorphism
Meaning: Polymorphism allows one function to perform different tasks depending on the
object.
Example: draw()
For Circle → Draw Circle
For Rectangle → Draw Rectangle Same
function, different behavior.
Object-Oriented Languages
Examples of Object-Oriented Programming languages:
• C++
• Java
• Python
• C#
• Ruby
Applications of OOP
OOP is widely used in:
• Banking Systems
⚠️Note: Unauthorized sharing, distribution, or reproduction of this PDF is illegal. This material is licensed
for individual use only and must not be shared with others.
Campusify – Notes for MSBTE Diploma
Priority-Based | Topic-Wise | Exam-Oriented
• Hospital Management Systems
⚠️Note: Unauthorized sharing, distribution, or reproduction of this PDF is illegal. This material is licensed
for individual use only and must not be shared with others.
Campusify – Notes for MSBTE Diploma
Priority-Based | Topic-Wise | Exam-Oriented
• Student Management Systems
• Game Development
• GUI Applications
• Android Applications
• E-Commerce Websites
Applications of OOP (Exam-Oriented)
1. Banking Systems
• Used to manage customer accounts, transactions, loans, and ATM services.
• Each customer and account is represented as an object, making the system secure
and easy to maintain.
2. Game Development
• Used to develop video games.
• Game characters, vehicles, weapons, and enemies are represented as objects with their
own properties and behaviors.
3. GUI (Graphical User Interface) Applications
• Used to develop desktop applications with buttons, menus, text boxes, and
windows.
• Each GUI component is treated as an object, making the interface easier to design
and manage.
4. E-Commerce Applications
• Used to manage products, customers, shopping carts, orders, and payments.
• Different objects interact with each other, making the application organized,
reusable, and scalable.
⚠️Note: Unauthorized sharing, distribution, or reproduction of this PDF is illegal. This material is licensed
for individual use only and must not be shared with others.