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

1.introduction To OOP

Uploaded by

Sadi Rifat
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

1.introduction To OOP

Uploaded by

Sadi Rifat
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Introduction to OOP

Md. Alamgir Hossain


Senior Lecturer,
Dept. of CSE, Prime University
Mail: [email protected]
YouTube: https://www.youtube.com/alamgirhossaincse
Blog: https://alamgirhossainjust.blogspot.com/
Programming Techniques (Unstructured)

A programming language in which the entire logic of the program is written as


a single continuous (nonstop or unbroken) block is called ”unstructured
Programming”.
Program written by following this language is very difficult to modify and
to debug.
Example: Assembly Language Programming
Programming Techniques (Structured)

A programming language in which the entire logic of the program is written by


dividing it into smaller units or modules is called ”structured programming
Language”.
In C, the smaller units are referred to as functions.
A function is written separately to perform a specific task.
Each function has a unique name.
It is called for execution in the main body of program with reference to its
name.
Program written in structured programming language is very easy to modify and
to debug.
Today, the most popular and commonly used structured programming language
is C language.
Programming Techniques (OOP)

Object-oriented programming (OOP) is a software programming model


constructed around objects. In this way, the data structure becomes an object that
includes both data and functions.
In addition, programmers can create relationships between one object and
another. For example, objects can inherit characteristics from other objects.
Many of the most widely used programming languages (such as C++, Java,
Python, etc.)
Difference between Procedural Programming and OOP
PROCEDURAL ORIENTED PROGRAMMING OBJECT ORIENTED PROGRAMMING
In procedural programming, program is divided into In object oriented programming, program is divided into
small parts called functions. small parts called objects.
Object oriented programming follows bottom up
Procedural programming follows top down approach.
approach.
Object oriented programming have access specifiers like
There is no access specifier in procedural programming.
private, public, protected etc.
Adding new data and function is not easy. Adding new data and function is easy.
Procedural programming does not have any proper way Object oriented programming provides data hiding so it
for hiding data so it is less secure. is more secure.
In procedural programming, overloading is not possible. Overloading is possible in object oriented programming.
In procedural programming, function is more important In object oriented programming, data is more important
than data. than function.
Procedural programming is based on unreal world. Object oriented programming is based on real world.
Examples: C, FORTRAN, Pascal, Basic etc. Examples: C++, Java, Python, C# etc.
Why Object-Oriented Programming

Objects are modeled on real world entities.


It provides data hiding.
Provides reusability of code through inheritance.
Provides flexibility through polymorphism.
OOP provides the effective problem-solving way.
Provides easy code maintenance.
OOP is faster and easier to execute.
OOP provides a clear structure for the programs
Features of OOP

Classes & Objects


Abstraction
Encapsulation
Inheritance
Polymorphism
Dynamic Binding
Message Passing
Major Parts of a C program
Homework

What is the main difference between the procedural oriented programming and
object-oriented programming which is directly connected to change the real
world? (Don't try to copy and paste, just write your opinion).
Thank You

You might also like