CLASS Diagram Annotations You Need to Know for CSC440 |
Main Annotation
|
Type |
Picture
|
Read from side touching the shape to other side | Read from side with no shape to annotated side | What happens when one side deleted |
Open Diamond | A class contains another class |
|
Search Service "has a " query builder | Query builder "is part of " the search service | When search service is deleted, query builder remains |
Closed Diamond | One class constructs and owns the other class |
|
Session "has " transactions (plural because of *) | A Transaction "is part of " one session | When session is deleted, transaction is deleted also. |
Big Open Triangle on Solid Line | One class IS a type of another class |
|
Account "can be a " checking account or savings account | A checking account "is a " Account | |
Big Open Triangle on Dotted Line | One class realizes (implements or executes) the other |
|
SiteSearch needs someone to implement it, but does not know who implements it | Search Service implements (realizes) SiteSearch | |
Small Arrow on Solid Line | One side contains an instance of the the other side |
|
Cash Dispenser contains a log file instance | Log file does not even know Cash Dispenser exists | |
Small Arrow on Dotted Line | Weak relationship (creates during a method perhaps) |
|
Product Manager somehow uses a Product | Product does not know Product Manager exists | |