- 2070 Asar · 2 marks
Compare procedural and object oriented programming
Short answer
Procedural programming focuses on functions and steps, uses global data, and follows top-down design. Object-oriented programming centers on objects, encapsulates data for security, uses bottom-up design, and provides inheritance and polymorphism.
Compare procedural and object oriented programming.
| Point | Procedural programming | Object oriented programming |
|---|---|---|
| Basic unit | Function (procedure) | Object / class |
| Emphasis | On steps (algorithm) | On data |
| Approach | Top-down | Bottom-up |
| Data | Shared globally, not secure | Hidden inside objects, secure |
| Reuse | Only by functions | Inheritance and polymorphism |
| Real-world modelling | Difficult | Easy |
| Examples | C, Pascal, FORTRAN | C++, Java, C# |
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Advantages of OOP over procedural programming · Object Oriented Programming, chapter 1 · asked 5×
- Limitations of procedural programming · Object Oriented Programming, chapter 1
- Prime number program: procedural and OOP · Object Oriented Programming, chapter 1
- Compare complex magnitude by overloading · Object Oriented Programming, chapter 5
- Vector class addition by object argument · Object Oriented Programming, chapter 1
- Dynamic memory for object and object array · Object Oriented Programming, chapter 3
- Object oriented system and core concepts · Object Oriented Analysis and Design, chapter 1
- Algorithmic vs object-oriented decomposition · Object Oriented Analysis and Design, chapter 1
- Define object; method implements behavior · Object Oriented Analysis and Design, chapter 1
- Short note: Flow of object · Object Oriented Analysis and Design, chapter 2