0% found this document useful (0 votes)
41 views1 page

Difference Between Structured Programming and Object Oriented Programming

Uploaded by

Malik Ravel
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)
41 views1 page

Difference Between Structured Programming and Object Oriented Programming

Uploaded by

Malik Ravel
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/ 1

Lecture 1

Difference between Structured Programming and Object Oriented


Programming:
Revision of programming fundamentals till structures is the part of structured programming.

OOP is the type of programming we are going to discuss in this course.

Why do we need Object Oriented Programming when all tasks can be performed with SP?

Security

OOP is secured because we can hide information as required. But in SP, this feature is not available.

Top-Down and Bottom-up Approach


In top down approach followed by SP, main() function is written first and all sub functions are called
from main function. Then, sub functions are written based on the requirement. Whereas, in bottom
up approach followed by OOP, code is developed for modules and then these modules are integrated
with main() function.

Reusability and Function Dependency


Structured Programming provides less reusability, more function dependency. Object Oriented
Programming provides more reusability, less function dependency.

Access Modifiers

There are three types of access modifiers: public, private, and protected.

A public member is accessible from anywhere outside the class but within a program

A private member variable or function cannot be accessed, or even viewed from outside the class. Only
the class and friend functions can access private members.

A protected member variable or function is very similar to a private member but it provided one
additional benefit that they can be accessed in child classes which are called derived classes.

You might also like