Programming Paradigms
Kaustubh Kulkarni Assistant Professor,
Department of Computer Engineering, KJSCE.
A programming paradigm is a style, or “way,” of programming.
2
Unstructured (Imperative) Programming
3
Example (BASIC language)
Structured Programming
5
Example of an unstructured paradigm
Example of structured paradigm
Procedural Programming
8
9
Procedural Programming Illustration 1
10
Procedural Programming Illustration 2
Example of procedural paradigm
Modular Programming
12
13
Modular Programming Illustration
Object-Oriented Programming (OOP)
Example : Procedural
Example : Modular
Header file : area_calculations.h
Example : Modular
Example of OOP
Feature | Procedural Programming | Modular Programming | Object-Oriented Programming (OOP) |
Focus | Program logic flow | Code reusability | Real-world entities and their behavior |
Structure | Linear sequence of functions | Independent modules | Classes and objects |
Data Organization | Less emphasis on encapsulation | Data encapsulation within modules | Data encapsulated within objects |
Code Reusability | Limited | High emphasis | High emphasis, with inheritance |