Write Some of the key advantages which make the object-oriented technology significantly attractive than other technologies? Discuss the difference between Object oriented and Function Oriented approach also elaborate the difference using diagram.
Show answerJawab dekhein
Advantages: easier modelling of real-world entities, reuse of classes and components, easier maintenance and extension because changes stay local (encapsulation), information hiding, and natural support for iterative development. Difference: in the function-oriented approach the system is decomposed into functions that share global data/state; data and functions are separate, so a change in data can affect many functions. In the object-oriented approach the system is a set of interacting objects, each encapsulating its own data and the operations on it; objects communicate by messages, so state is decentralised and changes are localised. Diagram description: function-oriented = several functions (F1, F2, F3) all connected to one shared data store; object-oriented = several objects, each a box holding its own data and operations, linked by message arrows.