Presentation is loading. Please wait.

Presentation is loading. Please wait.

Class Diagram UML Annotations Example: cs.gordon.edu/courses/cps211/ATMExamp le/ClassDiagram.html cs.gordon.edu/courses/cps211/ATMExamp.

Similar presentations


Presentation on theme: "Class Diagram UML Annotations Example: cs.gordon.edu/courses/cps211/ATMExamp le/ClassDiagram.html cs.gordon.edu/courses/cps211/ATMExamp."— Presentation transcript:

1 Class Diagram UML Annotations Example: http://www.math- cs.gordon.edu/courses/cps211/ATMExamp le/ClassDiagram.html http://www.math- cs.gordon.edu/courses/cps211/ATMExamp le/ClassDiagram.html Diamond Big Open Triangle Small Arrow Dotted line http://www.uml-diagrams.org/class- reference.htmlhttp://www.uml-diagrams.org/class- reference.html

2 ATM – check Bjork’s design  Class diagram Annotations  Diamond  Diamond attached to the class that contains another class.  Often read as “has a “ from the diamond side to the non-diamond, and “is part of” from the non- diamond to the diamond.  Filled diamond means the part cannot exist without the container. If the container is deleted, delete the parts. Chapter 7 Design and implementation2

3 ATM – check Bjork’s design – more annotations  Class diagram Annotations  Triangle  Triangle attached to the whole in an “is a “ relationship.  The class not touching the triangle “is a “ the class touching the triangle.  The class touching the triangle “can be a “ the class not touching the triangle (“but it will not always be one”) Chapter 7 Design and implementation3

4 ATM – check Bjork’s design – more annotations  Class diagram Annotations  Small arrow  Two classes are related, but only one knows the relationship exists  The class without the arrow knows the one with the arrow exists  Solid line – the arrow side is contained inside the other side  Dotted line – just has a weak relationship with (maybe creates it during a method) Chapter 7 Design and implementation4

5 ATM – check Bjork’s design – more annotations  Class diagram Annotations  Dotted line - association  To small arrow – depends on the small arrow side  Non-arrow side “somehow depends upon” arrow side  (small arrow side may be an interface)  Maybe “uses’, calls, creates, sends, instead of “depends upon”  To large arrow - realizes (implements or executes)  Non arrow side implements or executes arrow side Chapter 7 Design and implementation5

6 Inventory UML Simple Product is a product manager A product manager can be a Simple Product manager ProductManager knows Product exists, but Product does not know. PM changes product

7 Try one (observer) Concrete Observer is a Observer Concerted subject is the information being observed Concrete observer holds one copy of the subject's state Concrete subject is a subject Subject has an observer (diamond) Observer is part of a subject (diamond) Observer is owned by Subject (filled circle)

8 One More - File Inventory All these files are types of Inventory Items Directory and path are inventory containers Items and containers are inventory elements Elements are part of inventory container, and inventory model and should be deleted when container gone An element has a inventory relationship, which deletes when the element is gone


Download ppt "Class Diagram UML Annotations Example: cs.gordon.edu/courses/cps211/ATMExamp le/ClassDiagram.html cs.gordon.edu/courses/cps211/ATMExamp."

Similar presentations


Ads by Google