Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

AspectObject-Oriented ApproachProcedure-Oriented Approach
Basic UnitObjects (instances of classes)Functions or procedures
FocusData and how it is manipulated (data-centric)Procedures and sequence of tasks (process-centric)
StructurePrograms are organized around classes and objectsPrograms are divided into functions
Data HandlingData is encapsulated (private/protected)Data is often global, accessible to all functions
ModularityHigh, due to encapsulation and classesModerate, relies on function separation
ReusabilityHigh, via inheritance and polymorphismLimited, requires rewriting or copying code
ScalabilityScales well for large, complex systemsBecomes cumbersome in large systems
SecurityBetter, due to encapsulation and access controlLower, as data is often exposed
ExamplesJava, C++, Python (OO mode)C, Fortran, Pascal
Real-World ModelingNaturally models real-world entities (e.g., Car, Person)Less intuitive for complex entities
MaintenanceEasier to modify and extendHarder, as changes may affect multiple functions