Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
Module 2 - Static Use Case Modeling 1
Title of Topic:
Associations, Attributes
Course Code: 20CS501
Course Title: Object Oriented Analysis and Design
Session Number: 2.6
Faculty Name: Ms. P. Anantha Prabha
Academic Year: 2022 - 2023 (Odd Sem)
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
Module 2 - Static Use Case Modeling 2
Module 2 - Static Use Case Modeling
2.1 Use Case Modeling: Modeling Requirements, Components
2.2 Use Case Identification and Description
2.3 Use Case Relationships
Use Case Modeling, Relating Use cases - Include-Extend-
Generalization
Class Diagram-Elaboration, Domain Model
2.5 Finding Conceptual Classes and Description Classes
2.6 Associations, Attributes, Domain Modeling Using Class Diagrams
2.7 Domain Model Refinement, Finding conceptual class Hierarchies-
Aggregation and Composition
CO3 Interpret Use Case relationships in Use Case Modeling
CO4 Identify the object and class relationships for building UML diagrams
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
3
Associations
An association is a relationship between instances of
types that indicates some meaningful and interesting
connection
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
Associations and Attributes
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
5
Useful Associations
• Associations for which knowledge of the relationship
needs to be preserved for some duration.
• Associations derived from the Common Associations
List.
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
6
UML Association Notation
• An association is represented as a line between
classes with an association name.
• Associations are inherently bidirectional.
• Optional reading direction arrow is only an aid to the reader
of the diagram.
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
7
Finding Associations
Common Association List
The common categories that are worth considering
are:
• A is a physical part of B . Eg: Wing-Airplane
• A is a logical part of B. Eg: SalesLineItem- Sale.
• A is physically contained in B . Eg: Register- Store.
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
8
Common Associations List 2
• A is logically contained in B.
Eg:ItemDescription-Catalog.
• A is a description of B.Eg:ItemDescription- Item.
• A is a line item of a transaction or report
B.Eg:SalesLineItem-Sale.
• A is a member of B .Eg: Cashier-Store.
• A uses or manages B.Eg:Cashier-Register.
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
9
Common Associations List 3
• A is known/logged/recorded/reported/captured in B.Eg:
Sale-Register.
• A is an organizational subunit of B .
Eg:Department-Store.
• A communicates with B. Eg:Customer- Cashier.
• A is next to B. Eg:City-City.
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
10
Common Associations List 4
• A is related to a transaction B. Eg:
Customer-Payment.
• A is a transaction related to another
transaction B. Eg:Payment-Sale.
• A is next to B. Eg:City-City.
• A is owned by B. Eg:Register-Store.
• A is an event related to B. Eg:Sale-Customer.
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
11
High-Priority Associations
• A is a physical or logical part of B.
• A is physically or logically contained in/on B.
• A is recorded in B.
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
12
Associations Guidelines
• The knowledge of the relationship needs to be preserved
for some duration.
• Identifying conceptual classes is more important than
identifying associations.
• Avoid showing redundant or derivable associations.
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
Associations and Attributes
Multiplicity defines how many instances of a class A can be associated
with one instance of a class B
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
Associations and Attributes
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
Associations and Attributes
Naming Associations
Name an association based on a TypeName-VerbPhrase-TypeName format
where the verb phrase creates a sequence that is readable and meaningful in
the model context.
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
Associations and Attributes
 An association indicates that the system you are developing stores links
of some kind between the instances of the associated types.
 An association is a diagrammatic method of showing an attribute or pair
of attributes.
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
Associations and Attributes
 An attribute is a logical data value of an object.
 For example, a receipt (which reports the information of a sale)
normally includes a date and time, and management wants to know the
dates and times of sales for a variety of reasons. Consequently, the Sale
conceptual class needs a date and time attribute.
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
Modeling Attribute Quantities and Units
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
Associations and Attributes
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
Associations and Attributes
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
Association and Multiplicity
Association and Multiplicity-
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
Associations and Attributes
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
Associations and Attributes
Session 6 – Associations, Attributes, Domain Modeling Using Class Diagrams
Try Yourself

2.6 Associations, Attributes.pptx

  • 1.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams Module 2 - Static Use Case Modeling 1 Title of Topic: Associations, Attributes Course Code: 20CS501 Course Title: Object Oriented Analysis and Design Session Number: 2.6 Faculty Name: Ms. P. Anantha Prabha Academic Year: 2022 - 2023 (Odd Sem)
  • 2.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams Module 2 - Static Use Case Modeling 2 Module 2 - Static Use Case Modeling 2.1 Use Case Modeling: Modeling Requirements, Components 2.2 Use Case Identification and Description 2.3 Use Case Relationships Use Case Modeling, Relating Use cases - Include-Extend- Generalization Class Diagram-Elaboration, Domain Model 2.5 Finding Conceptual Classes and Description Classes 2.6 Associations, Attributes, Domain Modeling Using Class Diagrams 2.7 Domain Model Refinement, Finding conceptual class Hierarchies- Aggregation and Composition CO3 Interpret Use Case relationships in Use Case Modeling CO4 Identify the object and class relationships for building UML diagrams
  • 3.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams 3 Associations An association is a relationship between instances of types that indicates some meaningful and interesting connection
  • 4.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams Associations and Attributes
  • 5.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams 5 Useful Associations • Associations for which knowledge of the relationship needs to be preserved for some duration. • Associations derived from the Common Associations List.
  • 6.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams 6 UML Association Notation • An association is represented as a line between classes with an association name. • Associations are inherently bidirectional. • Optional reading direction arrow is only an aid to the reader of the diagram.
  • 7.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams 7 Finding Associations Common Association List The common categories that are worth considering are: • A is a physical part of B . Eg: Wing-Airplane • A is a logical part of B. Eg: SalesLineItem- Sale. • A is physically contained in B . Eg: Register- Store.
  • 8.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams 8 Common Associations List 2 • A is logically contained in B. Eg:ItemDescription-Catalog. • A is a description of B.Eg:ItemDescription- Item. • A is a line item of a transaction or report B.Eg:SalesLineItem-Sale. • A is a member of B .Eg: Cashier-Store. • A uses or manages B.Eg:Cashier-Register.
  • 9.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams 9 Common Associations List 3 • A is known/logged/recorded/reported/captured in B.Eg: Sale-Register. • A is an organizational subunit of B . Eg:Department-Store. • A communicates with B. Eg:Customer- Cashier. • A is next to B. Eg:City-City.
  • 10.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams 10 Common Associations List 4 • A is related to a transaction B. Eg: Customer-Payment. • A is a transaction related to another transaction B. Eg:Payment-Sale. • A is next to B. Eg:City-City. • A is owned by B. Eg:Register-Store. • A is an event related to B. Eg:Sale-Customer.
  • 11.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams 11 High-Priority Associations • A is a physical or logical part of B. • A is physically or logically contained in/on B. • A is recorded in B.
  • 12.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams 12 Associations Guidelines • The knowledge of the relationship needs to be preserved for some duration. • Identifying conceptual classes is more important than identifying associations. • Avoid showing redundant or derivable associations.
  • 13.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams Associations and Attributes Multiplicity defines how many instances of a class A can be associated with one instance of a class B
  • 14.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams Associations and Attributes
  • 15.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams Associations and Attributes Naming Associations Name an association based on a TypeName-VerbPhrase-TypeName format where the verb phrase creates a sequence that is readable and meaningful in the model context.
  • 16.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams Associations and Attributes  An association indicates that the system you are developing stores links of some kind between the instances of the associated types.  An association is a diagrammatic method of showing an attribute or pair of attributes.
  • 17.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams Associations and Attributes  An attribute is a logical data value of an object.  For example, a receipt (which reports the information of a sale) normally includes a date and time, and management wants to know the dates and times of sales for a variety of reasons. Consequently, the Sale conceptual class needs a date and time attribute.
  • 18.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams Modeling Attribute Quantities and Units
  • 19.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams Associations and Attributes
  • 20.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams Associations and Attributes
  • 21.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams Association and Multiplicity Association and Multiplicity-
  • 22.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams Associations and Attributes
  • 23.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams Associations and Attributes
  • 24.
    Session 6 –Associations, Attributes, Domain Modeling Using Class Diagrams Try Yourself

Editor's Notes