SlideShare a Scribd company logo
UML Constructs
Object Oriented Programming
University of Azad Jammu & Kashmir
Muzaffarabad
Deparment of CS & IT
• Dawood Faheem Abbasi
CONTENT LIST
• UML
• GENERALIZATION
• SPECIALIZATION
• CATEGORIES
• AGGREGATION
• ASSOCIATION
• REALIZATION
• DEPENDENCY
UML(Unified Modeling Language)
• The UML is a graphical language for modeling
computer programs. Modeling means to create a
simplified representation of something, as a
blueprint models a house. The UML provides a
way to visualize the higher level organization of
programs without getting mired down in the
detail of actual code.
• The blueprint of a system is written in it.
• UML is a notation system though which we can
visualize a model of a system
• It describe only design or structure of system
Generalization
• The process of extracting common characteristics
from two or more classes and combining them into
a generalized superclass, is called Generalization.
• The common characteristics can be attributes or
methods.
• Generalization is represented by a triangle followed
by a line.
Specialization
• Specialization is the reverse process of
Generalization means creating new sub
classes from an existing class.
Example
• Let’s take an example of Bank
Account;
• A Bank Account is of two
types –
• Current Account and Saving
Account.
• Current Account and Saving
Account inherits the common/
generalized properties like
Account Number, Account
Balance etc. from a Bank
Account and also have their
own specialized properties like
interest rate etc.
Advantages of specialization
• Reusability:
It allows the developer to reuse the existing
code in many situations. Single class can be used
many times.
• Saves time and effort:
It allow a developer to save a lot of time to
rewrite the same classes again.
• Increase program structure and reliability:
Super class is already compiled and tested
properly. This can be used again without compiling
again. It increases reliability of program or software.
Syntax
#include<iostream.h>
#include<conio.h>
Class parent
{
};
Class child: public parent
{
};
Categories
• Single:
• The modeling in which a child class is derived from
a single parent class.
• This child class inherits all data members and
member functions of parent class.
• Multiple:
• The type of modeling in which child class is
derived from the multiple parents.
• The child class inherits all data members and
member functions of all the parent class.
Access level
Access specifier Accessible from
own class
Accessible from
derived class
Accessible from
objects outside
class
public Yes Yes Yes
protected Yes Yes No
private Yes No No
Single parent class
• Class A
• {
• };
• Class B: public A
• {
• };
• Class C: public A
• {
• };
A
B C
Multiple parent classes
Class A
{
};
Class B
{
};
Class C: public A, public B
{
};
A B
C
Association
• Association is a relationship between two
objects. In other words, association defines
the multiplicity between objects.
• Association is basically a set of links that
connects elements of an UML model. It also
describes how many objects are taking part in
that relationship.
A bidirectional association Unidirectional association.
Realization
• Realization can be defined as a relationship in
which two elements are connected. One
element describes some responsibility which
is not implemented and the other one
implements them. This relationship exists in
case of interfaces.
Dependency
• Dependency is a relationship between two
things in which change in one element also
affects the other one.
Aggregation
• Aggregation is a special case of association. A
directional association between objects.
When an object ‘has-a’ another object, then
you have got an aggregation between them.
Direction between them specified which
object contains the other object. Aggregation
is also called a “Has-a” relationship.
Composition
• Composition is a special case of aggregation.
In a more specific manner, a restricted
aggregation is called composition. When an
object contains the other object, if the
contained object cannot exist without the
existence of container object, then it is called
composition.
Difference between aggregation and
composition
• Composition is more restrictive.
• When there is a composition between two objects, the
composed object cannot exist without the other object.
• This restriction is not there in aggregation.
• Though one object can contain the other object, there is no
condition that the composed object must exist.
• The existence of the composed object is entirely optional.
• In both aggregation and composition, direction is must.
• The direction specifies, which object contains the other
object.
Understanding Association, Aggregation and
Composition
1. Manager is an employee of XYZ limited corporation.
2. Manager uses a swipe card to enter XYZ premises.
3. Manager has workers who work under him.
4. Manager has the responsibility of ensuring that the project
is successful.
5. Manager's salary will be judged based on project success.
If you flesh out the above 5 point requirement we can easily
visualize 4 relationships:-
– Inheritance
– Aggregation
– Association
– Composition
• Let's understand them one by one.
Requirement 1 (The IS A relationship)
• If you see the first requirement (Manager is an
employee of XYZ limited corporation) it's a
parent child relationship or inheritance
relationship. The sentence above specifies
that Manager is a type of employee, in other
words we will have two classes one the parent
class "Employee" and the other a child class
"Manager" which will inherit from "Employee"
class.
Requirement 2 (The Using relationship: - Association)
• The requirement 2 is an
interesting requirement
(Manager uses a swipe card to
enter XYZ premises).
• In this requirement the
manager object and swipe
card object use each other but
they have their own object life
time. In other words they can
exist without each other.
• The most important point in
this relationship is that there is
no single owner.
• The above diagram shows how the "Swipe
Card" class uses the "Manager" class and the
"Manager" class uses the "Swipe Card" class.
You can also see how we can create the object
of the "Manager" class and "Swipe Card"
independently and they can have their own
object life time.
• This relationship is called as the "Association"
relationship.
Requirement 3 (The Using relationship with Parent: -
Aggregation)
• The third requirement from our list
(Manager has workers who work
under him) denotes the same type of
relationship like association but with
a difference that one of them is an
owner. So as per the requirement the
"Manager" object will own "Workers"
object.
• The child "Worker" objects can not
belong to any other objects. For
instance the "Worker" object cannot
belong to the "Swipe Card" object.
• But But....the "Worker" object can
have his own life time which is
completely disconnected from the
"Manager" object. Looking from a
different perspective it means that if
the "Manager" object is deleted the
"Worker" object does not die.
• This relationship is termed as the
"Aggregation" relationship.
Requirement 4 and 5 (The Death relationship: -
Composition)
• The last two requirements are actually
logically one. If you read closely both the
requirements which are as follows:-
• Manager has the responsibility of
ensuring that the project is successful.
• Manager's salary will be judged based on
project success.
• Below is the conclusion from analyzing the
above requirements:-
• Manager and the project objects are
dependent on each other.
• The lifetimes of both the objects are
same. In other words the project will not
be successful if the manager is not good
and manager will not get good increments
if project has issues.
• Below is how the class formation will look
like. You can also see when I go to create
the project object it needs the manager
object.
Putting all things together
Summary
To avoid confusion hence forth in these 3 terms I have put forward a table below
which will help you compare them from 3 angles owner , life time and child object.
Association Aggregation composition
Owner No owner Single owner Single owner
Life time Have their own life
time
Have their own life
time
Owner’s life
Child object No child objects, all
are independent
Child objects
belong to single
parent
Child objects
belong to single
parent
THANK YOU
TAKE A SMILE..! THEY ARE FREE…;)

More Related Content

What's hot (20)

PPTX
Common language runtime clr
SanSan149
 
PPT
Object Oriented Design in Software Engineering SE12
koolkampus
 
PPT
Distributed Systems Architecture in Software Engineering SE11
koolkampus
 
PPTX
Logical database design and the relational model(database)
welcometofacebook
 
PPT
08. Object Oriented Database in DBMS
koolkampus
 
DOC
Distributed Operating System,Network OS and Middle-ware.??
Abdul Aslam
 
PPTX
Entity Relationship design issues
Megha Sharma
 
PDF
2 database system concepts and architecture
Kumar
 
PDF
Software Designing - Software Engineering
Purvik Rana
 
PPT
UML Architecture and Views
Kumar
 
PPTX
The Relational Model
Bhandari Nawaraj
 
PPTX
Data models
Thakshayini Chandramohan
 
PDF
OOAD
yndaravind
 
DOCX
The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...
Raj vardhan
 
PPTX
Requirement and Specification
sarojsaroza
 
PPT
Coupling and cohesion
Sutha31
 
PPTX
Sql fundamentals
Ravinder Kamboj
 
PPTX
Overview of UML Diagrams
Manish Kumar
 
PPTX
Structure of shared memory space
Coder Tech
 
Common language runtime clr
SanSan149
 
Object Oriented Design in Software Engineering SE12
koolkampus
 
Distributed Systems Architecture in Software Engineering SE11
koolkampus
 
Logical database design and the relational model(database)
welcometofacebook
 
08. Object Oriented Database in DBMS
koolkampus
 
Distributed Operating System,Network OS and Middle-ware.??
Abdul Aslam
 
Entity Relationship design issues
Megha Sharma
 
2 database system concepts and architecture
Kumar
 
Software Designing - Software Engineering
Purvik Rana
 
UML Architecture and Views
Kumar
 
The Relational Model
Bhandari Nawaraj
 
The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...
Raj vardhan
 
Requirement and Specification
sarojsaroza
 
Coupling and cohesion
Sutha31
 
Sql fundamentals
Ravinder Kamboj
 
Overview of UML Diagrams
Manish Kumar
 
Structure of shared memory space
Coder Tech
 

Viewers also liked (10)

PPT
C++ for beginners
Salahaddin University-Erbil
 
PDF
Opposites with prefixes
1MarBarbero
 
PDF
Ieee Final Year Project Topics And Ideas trichy
krish madhi
 
PDF
Agora hills ca egress plan
Richard Clark
 
DOCX
OPIExecutiveSummary-2
Hannah Dion
 
DOCX
Business Management Course Outlines
Jean-Paul Belliveau
 
PDF
logo_herbtea-eng
Salivon Sergey
 
PPT
Exposicion diego rivera
Michelle Bouvier
 
PPT
Introduction to Procedural Programming in C++
Salahaddin University-Erbil
 
PDF
O'levels Computer Science 2210 Syllaybus 2015
Tabsheer Hasan
 
C++ for beginners
Salahaddin University-Erbil
 
Opposites with prefixes
1MarBarbero
 
Ieee Final Year Project Topics And Ideas trichy
krish madhi
 
Agora hills ca egress plan
Richard Clark
 
OPIExecutiveSummary-2
Hannah Dion
 
Business Management Course Outlines
Jean-Paul Belliveau
 
logo_herbtea-eng
Salivon Sergey
 
Exposicion diego rivera
Michelle Bouvier
 
Introduction to Procedural Programming in C++
Salahaddin University-Erbil
 
O'levels Computer Science 2210 Syllaybus 2015
Tabsheer Hasan
 
Ad

Similar to UML constructs (20)

PPTX
Aggregation
zindadili
 
PPT
UML-class diagram for beginners to adance.ppt
WorkDrive2
 
PPT
cse 355 UML class diagram software engineering.ppt
Safaet Hossain
 
PPT
UML-class_diagram.ppt
PragnyaNandaSabat
 
PPTX
OOP - Understanding association, aggregation, composition and dependency
Mudasir Qazi
 
PPT
UML-class_diagram.ppt diagrams ppt download
divijareddy0502
 
PPTX
Relationships and their representation in a class diagram.pptx
nesarahmad37
 
PPTX
introofUML.pptx
RojaPogul1
 
PPTX
Std 12 computer chapter 6 object oriented concepts (part 2)
Nuzhat Memon
 
PPT
Object Oriented Relationships
Taher Barodawala
 
PPT
Chapter3
Dang Tuan
 
PDF
Introduction to UML, a guide to learn.pdf
TARGARYEN001
 
PPT
08 class and sequence diagrams
kebsterz
 
PPT
Slide 5 Class Diagram
Niloy Rocker
 
PDF
2 class use case
Minal Maniar
 
PPTX
FALLSEM2024-25_SWE2018_ETH_VL2024250103302_2024-10-04_Reference-Material-I.pptx
yadavdkshitij2003
 
PPT
Css uml
suman Aggarwal
 
PPT
UML Introduction The system development life cycle (SDLC) is a complex projec...
ssuserdb9909
 
PPT
Descriptions of class diagrams in software
ssuser9d62d6
 
Aggregation
zindadili
 
UML-class diagram for beginners to adance.ppt
WorkDrive2
 
cse 355 UML class diagram software engineering.ppt
Safaet Hossain
 
UML-class_diagram.ppt
PragnyaNandaSabat
 
OOP - Understanding association, aggregation, composition and dependency
Mudasir Qazi
 
UML-class_diagram.ppt diagrams ppt download
divijareddy0502
 
Relationships and their representation in a class diagram.pptx
nesarahmad37
 
introofUML.pptx
RojaPogul1
 
Std 12 computer chapter 6 object oriented concepts (part 2)
Nuzhat Memon
 
Object Oriented Relationships
Taher Barodawala
 
Chapter3
Dang Tuan
 
Introduction to UML, a guide to learn.pdf
TARGARYEN001
 
08 class and sequence diagrams
kebsterz
 
Slide 5 Class Diagram
Niloy Rocker
 
2 class use case
Minal Maniar
 
FALLSEM2024-25_SWE2018_ETH_VL2024250103302_2024-10-04_Reference-Material-I.pptx
yadavdkshitij2003
 
UML Introduction The system development life cycle (SDLC) is a complex projec...
ssuserdb9909
 
Descriptions of class diagrams in software
ssuser9d62d6
 
Ad

More from Dawood Faheem Abbasi (11)

PPTX
First and follow set
Dawood Faheem Abbasi
 
PPTX
TCP/IP and UDP protocols
Dawood Faheem Abbasi
 
PPTX
Report writing
Dawood Faheem Abbasi
 
PPTX
Mathematical induction and divisibility rules
Dawood Faheem Abbasi
 
PPTX
Features of-RC-quad-copter
Dawood Faheem Abbasi
 
PPTX
7 cs of communication
Dawood Faheem Abbasi
 
PPTX
Geography of pakistan
Dawood Faheem Abbasi
 
PPTX
FET (Field Effect Transistors)
Dawood Faheem Abbasi
 
PPTX
Cyber crime.pptx
Dawood Faheem Abbasi
 
PPTX
BJT’s (bipolar junction transistor)
Dawood Faheem Abbasi
 
First and follow set
Dawood Faheem Abbasi
 
TCP/IP and UDP protocols
Dawood Faheem Abbasi
 
Report writing
Dawood Faheem Abbasi
 
Mathematical induction and divisibility rules
Dawood Faheem Abbasi
 
Features of-RC-quad-copter
Dawood Faheem Abbasi
 
7 cs of communication
Dawood Faheem Abbasi
 
Geography of pakistan
Dawood Faheem Abbasi
 
FET (Field Effect Transistors)
Dawood Faheem Abbasi
 
Cyber crime.pptx
Dawood Faheem Abbasi
 
BJT’s (bipolar junction transistor)
Dawood Faheem Abbasi
 

Recently uploaded (20)

PPSX
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PDF
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 

UML constructs

  • 2. University of Azad Jammu & Kashmir Muzaffarabad Deparment of CS & IT • Dawood Faheem Abbasi
  • 3. CONTENT LIST • UML • GENERALIZATION • SPECIALIZATION • CATEGORIES • AGGREGATION • ASSOCIATION • REALIZATION • DEPENDENCY
  • 4. UML(Unified Modeling Language) • The UML is a graphical language for modeling computer programs. Modeling means to create a simplified representation of something, as a blueprint models a house. The UML provides a way to visualize the higher level organization of programs without getting mired down in the detail of actual code. • The blueprint of a system is written in it. • UML is a notation system though which we can visualize a model of a system • It describe only design or structure of system
  • 5. Generalization • The process of extracting common characteristics from two or more classes and combining them into a generalized superclass, is called Generalization. • The common characteristics can be attributes or methods. • Generalization is represented by a triangle followed by a line.
  • 6. Specialization • Specialization is the reverse process of Generalization means creating new sub classes from an existing class.
  • 7. Example • Let’s take an example of Bank Account; • A Bank Account is of two types – • Current Account and Saving Account. • Current Account and Saving Account inherits the common/ generalized properties like Account Number, Account Balance etc. from a Bank Account and also have their own specialized properties like interest rate etc.
  • 8. Advantages of specialization • Reusability: It allows the developer to reuse the existing code in many situations. Single class can be used many times. • Saves time and effort: It allow a developer to save a lot of time to rewrite the same classes again. • Increase program structure and reliability: Super class is already compiled and tested properly. This can be used again without compiling again. It increases reliability of program or software.
  • 10. Categories • Single: • The modeling in which a child class is derived from a single parent class. • This child class inherits all data members and member functions of parent class. • Multiple: • The type of modeling in which child class is derived from the multiple parents. • The child class inherits all data members and member functions of all the parent class.
  • 11. Access level Access specifier Accessible from own class Accessible from derived class Accessible from objects outside class public Yes Yes Yes protected Yes Yes No private Yes No No
  • 12. Single parent class • Class A • { • }; • Class B: public A • { • }; • Class C: public A • { • }; A B C
  • 13. Multiple parent classes Class A { }; Class B { }; Class C: public A, public B { }; A B C
  • 14. Association • Association is a relationship between two objects. In other words, association defines the multiplicity between objects. • Association is basically a set of links that connects elements of an UML model. It also describes how many objects are taking part in that relationship.
  • 15. A bidirectional association Unidirectional association.
  • 16. Realization • Realization can be defined as a relationship in which two elements are connected. One element describes some responsibility which is not implemented and the other one implements them. This relationship exists in case of interfaces.
  • 17. Dependency • Dependency is a relationship between two things in which change in one element also affects the other one.
  • 18. Aggregation • Aggregation is a special case of association. A directional association between objects. When an object ‘has-a’ another object, then you have got an aggregation between them. Direction between them specified which object contains the other object. Aggregation is also called a “Has-a” relationship.
  • 19. Composition • Composition is a special case of aggregation. In a more specific manner, a restricted aggregation is called composition. When an object contains the other object, if the contained object cannot exist without the existence of container object, then it is called composition.
  • 20. Difference between aggregation and composition • Composition is more restrictive. • When there is a composition between two objects, the composed object cannot exist without the other object. • This restriction is not there in aggregation. • Though one object can contain the other object, there is no condition that the composed object must exist. • The existence of the composed object is entirely optional. • In both aggregation and composition, direction is must. • The direction specifies, which object contains the other object.
  • 21. Understanding Association, Aggregation and Composition 1. Manager is an employee of XYZ limited corporation. 2. Manager uses a swipe card to enter XYZ premises. 3. Manager has workers who work under him. 4. Manager has the responsibility of ensuring that the project is successful. 5. Manager's salary will be judged based on project success. If you flesh out the above 5 point requirement we can easily visualize 4 relationships:- – Inheritance – Aggregation – Association – Composition • Let's understand them one by one.
  • 22. Requirement 1 (The IS A relationship) • If you see the first requirement (Manager is an employee of XYZ limited corporation) it's a parent child relationship or inheritance relationship. The sentence above specifies that Manager is a type of employee, in other words we will have two classes one the parent class "Employee" and the other a child class "Manager" which will inherit from "Employee" class.
  • 23. Requirement 2 (The Using relationship: - Association) • The requirement 2 is an interesting requirement (Manager uses a swipe card to enter XYZ premises). • In this requirement the manager object and swipe card object use each other but they have their own object life time. In other words they can exist without each other. • The most important point in this relationship is that there is no single owner.
  • 24. • The above diagram shows how the "Swipe Card" class uses the "Manager" class and the "Manager" class uses the "Swipe Card" class. You can also see how we can create the object of the "Manager" class and "Swipe Card" independently and they can have their own object life time. • This relationship is called as the "Association" relationship.
  • 25. Requirement 3 (The Using relationship with Parent: - Aggregation) • The third requirement from our list (Manager has workers who work under him) denotes the same type of relationship like association but with a difference that one of them is an owner. So as per the requirement the "Manager" object will own "Workers" object. • The child "Worker" objects can not belong to any other objects. For instance the "Worker" object cannot belong to the "Swipe Card" object. • But But....the "Worker" object can have his own life time which is completely disconnected from the "Manager" object. Looking from a different perspective it means that if the "Manager" object is deleted the "Worker" object does not die. • This relationship is termed as the "Aggregation" relationship.
  • 26. Requirement 4 and 5 (The Death relationship: - Composition) • The last two requirements are actually logically one. If you read closely both the requirements which are as follows:- • Manager has the responsibility of ensuring that the project is successful. • Manager's salary will be judged based on project success. • Below is the conclusion from analyzing the above requirements:- • Manager and the project objects are dependent on each other. • The lifetimes of both the objects are same. In other words the project will not be successful if the manager is not good and manager will not get good increments if project has issues. • Below is how the class formation will look like. You can also see when I go to create the project object it needs the manager object.
  • 27. Putting all things together
  • 28. Summary To avoid confusion hence forth in these 3 terms I have put forward a table below which will help you compare them from 3 angles owner , life time and child object. Association Aggregation composition Owner No owner Single owner Single owner Life time Have their own life time Have their own life time Owner’s life Child object No child objects, all are independent Child objects belong to single parent Child objects belong to single parent
  • 29. THANK YOU TAKE A SMILE..! THEY ARE FREE…;)