0% found this document useful (0 votes)
55 views1 page

Function vs Object-Oriented Design

Uploaded by

amitesh sahoo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views1 page

Function vs Object-Oriented Design

Uploaded by

amitesh sahoo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Function vs object oriented design

Thursday, September 26, 2024 6:41 AM

Key Differences Between Function-Oriented and Object-Oriented Approaches:


Feature Function-Oriented Design Object-Oriented Design
Focus Functions (what the program should do) Objects (modeling real-world entities and
their interactions)
Data Handling Data is separate from functions Data and behavior are bundled together in
objects
Modularity Focuses on dividing the program into Focuses on creating self-contained objects
functions
Reusability Reusability is achieved by sharing Reusability through inheritance, composition,
functions and polymorphism
State Global variables or passing parameters Encapsulation of state within objects
Management between functions
Maintenance Can become harder to maintain as Easier to maintain due to encapsulation and
programs grow larger modularity
Design Typically top-down, starts with identifying Typically bottom-up, starts with identifying
Approach main functions objects/entities
Scalability Less scalable for large, complex systems More scalable due to encapsulation and
reusability
Conclusion
Function-oriented design is effective for small programs or situations where the primary
task involves computations or data transformations. However, for larger, more complex
systems, object-oriented design offers better modularity, reusability, and scalability
through its encapsulation of data and behavior within objects.

From <https://chatgpt.com/g/g-wcvrUzjNI-software-engineering/c/66f45bc6-8608-8003-a71f-e75f3a8aec32>

topics Page 1

You might also like