Please enable JavaScript.
Coggle requires JavaScript to display documents.
Object Oriented Programming (Features (Encapsulation (:check:Enforces…
Object Oriented Programming
Advantages
Code reuse
Design Benefits
Easy Software Maintenance
Disadvantages
Large size program
Effort
(Lot of effort goes to design)
Due to it's size the speed of execution is slow
Features
Encapsulation
:check:Enforces modularity
:check:Hides data
:check:Encapsulates data and methods
Inheritance
:check:Passes knowledge down
Abstraction
Polymorphism
:check:Objects or methods or block of code takes any shape
UML
Modeling OOS
Relationship
Association
No owner
Own lifecycle for each object
E.g. Teacher and Student (Both can be created and deleted independently).
Aggregation
Specialized form of Association
Own lifecycle for each object
Has owner - Child object belongs to single owner
HAS-A relation
E.g. Department and Teacher (Teacher can't belongs to different departments however department can be deleted)
Composition
Specialized form of Aggregation
Death relationship
Owns relationship
Child object does not have life cycle
if parent object is deleted.
E.g. House and Rooms.
Dependencey
References
No conceptual link b/n two objects
Example Enrollment Service object references Student and Course which can be injected as constructor dependence.
Inheritance