Más contenido relacionado
La actualidad más candente (20)
Similar a Lecture-03 Introduction to UML (20)
Lecture-03 Introduction to UML
- 1. Object Oriented Software Modeling and Design CE 350 Abdel-Karim Al-Tamimi, Ph.D. [email_address] http://faculty.yu.edu.jo/altamimi Al-Tamimi 2011 ©
- 11. Activity Diagram: Example Al-Tamimi 2011 © Leave House Take Class Wander Around Return to House Take another Class Done for today ? Arrive to university End of day
- 15. Interaction Diagrams – Sequence Diagram Al-Tamimi 2011 © Student Book Library Walk to school Access Library Browse Book Borrow book Read book
- 16. Interaction Diagrams – Collaboration Diagram Al-Tamimi 2011 © Book Student Library 1-Walk to school 5-Read book 3-Browse book 4-Borrow book 2-Access library
- 19. UML Notation of Objects and Classes Al-Tamimi 2011 © Class Object - indicates private attributes/methods + indicates public attributes/methods # indicates protected attributes/methods ~ indicates package visible attributes/methods Notice the naming convention BankAccount BankAccount - name - balance + debit (int amount): void + credit (int amount): void Object1 : BankAccount name = John Smith balance = 1,000 Object2 : BankAccount name = Robert Jones balance = -200
- 23. Generalization / Specialization Relationship Al-Tamimi 2011 © BankAccount attributes and methods are not specified again New attribute “interest” is shown in the subclass Generalization Specialization
- 27. Multiplicity Al-Tamimi 2011 © UML Multiplicity Meaning 1 Exactly 1 (default) 2 Exactly 2 1..3 From 1 to 3 inclusive 3, 5 Either 3 or 5 1..* At least [1], and at most [unlimited] * Unlimited (including 0) 0..1 Either 0 or 1
- 31. Qualification Relationship: Example Al-Tamimi 2011 © Driver vehicle drives But if he can only drive 4 wheels vehicles: Driver vehicle drives 4 wheels What if he can only drive his own car: Driver vehicle drives License plate
- 35. Association Classes Al-Tamimi 2011 © Sometimes, it is necessary to describe an association by including some attributes which do not naturally belong to the objects involved in the association Enrollment is an association class
- 50. Dependency Relationships in UML (1 of 2) Al-Tamimi 2011 © Type of Dependency Keyword Description Abstraction «abstraction», «derive», «refine», or «trace» Relates two model elements, or sets of model elements, that represent the same concept at different levels of abstraction, or from different viewpoints Binding «bind» Connects template arguments to template parameters to create model elements from templates
- 51. Dependency Relationships in UML (2 of 2) Al-Tamimi 2011 © Type of Dependency Keyword Description Realization «realize» Indicates that the client model element is an implementation of the supplier model element, and the supplier model element is the specification Substitution «bind» Indicates that the client model element takes the place of the supplier; the client model element must conform to the contract or interface that the supplier model element establishes Usage «use», «call», «create», «instantiate», or «send» Indicates that one model element requires another model element for its full implementation or operation