Download presentation
Presentation is loading. Please wait.
Published byHadia Irfan Modified over 8 years ago
1
Class and Diagram Representation of Class Name Attributes Operations Visibility of Attributes and Operations
2
Relationship or Notation of class diagram Generalization Association Composition Aggregation
4
Used for describing structure and behaviour in the use cases. Provide a conceptual model of the system in term of entities and their relationship.
6
The top part contain the name of the class. It is printed in Bold, centred and the first letter capitalized.
7
The middle part contains the attributes of the class. They are left aligned and the first letter is lower case.
8
The bottom parts gives the methods or operations the class can take or undertake. They are also left aligned and the first letter is lower case.
9
“+” is used to denoted Public visibility (everyone) “#” is used to denoted Protected visibility (friends and derived) “-” is used to denoted Private visibility (no one)
10
By default, attributes are hidden and operations are visible. The last two compartments may be omitted to simplify the class diagrams
11
Account Name -Customer Name - Balance +add Funds() +with Draw() +transfer() Name Attributes Operations
12
There are two kinds of Relationships Generalization (parent-child relationship) Association (student enrols in course) Association can be further classified as Aggregation Composition
13
Generalization express a parent/child relationship among related classes. Used for abstracting detail is several layers Example Super type supertype1 supertype2
14
Association represent relationship between instances of class. An association is a link connecting two classes. Bi-directional association Association are assumed to be bi- directional e.g. Flight and place Notation:
15
Uni-directional association e.g. Order and item Notation:
16
EXAMPLE: Student Department Course
17
Composition: express a relationship among instances of related classes. It is specific kind of Whole-Part relationship It expresses a relationship where an instance of the whole-class has the responsibilities to create and initialize instances of each Part-class.
18
EXAPMPLE OF COMPOSITION Legs Hands Person Automobile Engine Transmission
19
Aggregation: express a relationship among instances of related classes. It is a specific kind of Container Containee relationship. It express a relationship where an instance of the Container-class has the responsibility to hold and maintain instances of each Containee-class that have been created outside the auspices of the Container-class.
20
EXAMPLE OF AGGREGATION Employee Company
21
THANK YOU
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.