0% found this document useful (0 votes)
25 views8 pages

Chapter 2

The document discusses procedural programming and object-oriented programming. It provides definitions and examples of each, compares their characteristics, and lists popular programming languages for each paradigm.

Uploaded by

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

Chapter 2

The document discusses procedural programming and object-oriented programming. It provides definitions and examples of each, compares their characteristics, and lists popular programming languages for each paradigm.

Uploaded by

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

Y

FUNK
E S
TUN

OBJECT-ORIENTED
PROGRAMMING
CHAPTER 2

BY THEISA
Procedural Programming can be defined as a programming
model which is derived from structured programming, based
upon the concept of calling procedure.

Procedures, also known as routines, subroutines or functions,


simply consist of a series of computational steps to be carried
out.

During a program’s execution, any given procedure might be


called at any point, including by other procedures or itself.

Languages used in Procedural Programming:


FORTRAN, ALGOL, COBOL
Object-oriented programming is a programming model which is
based upon the concept of objects.

Objects contain data in the form of attributes and code in the


form of methods.

In object-oriented programming, computer programs are


designed using the concept of objects that interact with the real
world.

Object-oriented programming languages are various but the most


popular ones are class-based, meaning that objects are instances
of classes, which also determine their types.

Languages used in Object-Oriented Programming:


Java, C++, C#, Python,
PHP, JavaScript, Ruby, Perl,
Objective-C, Dart, Swift, Scala.
Procedural Oriented Programming Object-Oriented Programming

In procedural programming, the program is In object-oriented programming, the program is


divided into small parts called functions. divided into small parts called objects.

Procedural programming follows a top-down Object-oriented programming follows a bottom-


approach. up approach.

There is no access specifier in procedural Object-oriented programming has access


programming. specifiers like private, public, protected, etc.

Adding new data and functions is not easy. Adding new data and function is easy.

Procedural programming does not have any Object-oriented programming provides data
proper way of hiding data so it is less secure. hiding so it is more secure.

In procedural programming, overloading is not Overloading is possible in object-oriented


possible. programming.
Procedural Oriented Programming Object-Oriented Programming

In procedural programming, there is no In object-oriented programming, the concept


concept of data hiding and inheritance. of data hiding and inheritance is used.

In procedural programming, the function is In object-oriented programming, data is more


more important than the data. important than function.

Procedural programming is based on the unreal Object-oriented programming is based on


world. the real world.

Procedural programming is used for designing Object-oriented programming is used for


medium-sized programs. designing large and complex programs.

Procedural programming uses the concept of Object-oriented programming uses the concept
procedure abstraction. of data abstraction.

Code reusability absent in procedural Code reusability present in object-oriented


programming, programming.

Examples: C, FORTRAN, Pascal, Basic, etc. Exemples: C++, Java, Python, C#, etc.
1 #1 JAVA

2 #2N PYTHON
Advantages - Simple,
secure, an official
Android language,
robust, platform-

3 #3 C++
Advantages - Ideal for
data science, artificial
intelligence, and machine
independent.

Disadvantages - Slow,
Advantages - Portable, multi- learning, flexible, plenty requires a lot of memory,

4
paradigm, good memory of libraries, huge poor GUI.
management, high community, user-friendly.
#4 C# performance, large
community of support, Disadvantages - Relatively
Advantages - Type-safe, scalable. slow, high memory
memory access capabilities,
consumption.
part of the C family of Disadvantages - No garbage
programming languages, collection, less safe than
simple, flexible, inbuilt some other object-oriented
garbage collection, more counterparts, complex, less
secure than some other C flexible.
languages, cross-platform.

Disadvantages - Generally
limited to the Windows
sphere, relies on .NET, no
independent compiler, limited
performance.
1 #5 Ruby

2 #6 PHP
Advantages - Huge
community, speedy
development, plenty of
tools and libraries such

3 #7 Type Script
Advantages - Open-
source and free,
platform-independent,
as Ruby on Rails,
readable, high safety
standard.
Advantages - Adds static user-friendly, plenty of
typing to JavaScript, library support, ideal for Disadvantages - Slow
readable, predictable, building web performance, not very
strict typing, type applications. flexible.
inference, type
annotations. Disadvantages - Losing
popularity, low
Disadvantages - Complex performance, some
typing system, required security issues.
compilation, adds
transpiring.

You might also like