Unified Modeling Language Tutorial Zhengxing Chen Feb 11
Unified Modeling Language Tutorial Zhengxing Chen Feb 11 th, 2015
What is UML? • Unified Modeling Language • Standard way to visualize the design of a system • UML 1. 0 was submitted in 1997. UML 2. x is the current standard.
UML diagrams • 13 different diagrams in UML 2. 0 for use in software modeling. • Each has different purposes and visual elements. • We will cover: class, deployment, use case and sequence diagrams.
Class Diagram • Purpose: provides a static view of a system. • Widely used at the time of construction in object oriented languages. A class diagram showing a Student class
Class Diagram (cont. ) Realization: implementation of interface. Dashed line shaft and a triangular hollow arrowhead. Generalization: from subclass to superclass. Solid line for shaft and a triangular hollow arrowhead. A class diagram showing relationships between classes
Class Diagram (cont. ) Association: structural relationships between classes. Solid line with optional labels, arrows and stars. Dependency: association indicates dependency. Use dashed line for transient dependency relationship. A class diagram showing relationships between classes
Deployment Diagram • Purpose: • Visualize hardware topology of a system • Describe the hardware components used to deploy software components. • Help system engineers understand: • • Performance Scalability Maintainability Portability
Deployment Diagram (cont. ) Add messages, labels or environments flexibly. A deployment diagram showing relationships between devices
Sequence Diagram • Purpose: display interactions among the components of a system • Used to visualize the sequence of calls and messages in a system to perform a specific functionality
Sequence Diagram (cont. ) • Object proceeded by a colon. • Vertical dashed line is the lifeline of the object. The vertical axis corresponds to time.
Use-Case Diagram • Purpose: provides an overview of functionalities which a system is required to have by presenting all use cases • A use case describes how a user interacts with the system by defining the steps required to accomplish a specific goal. • Do not need to include details of use cases in Use-Case Diagram
Use-Case Diagram (cont. ) • Use cases displayed as ovals. • Use cases are connected to the actor who carry out the use cases.
Take-away • UML is a standard which aids to visualize the design of a system. • Class Diagram: a static view of relationships among classes. • Deployment Diagram: hardware structure of a system. • Sequence Diagram: interactions among objects for a specific task • Use Case Diagram: exhaust all use cases to provide high level functionality requirements
References & Materials • Pressman, R. S. (2005). Software engineering: a practitioner's approach. Palgrave Macmillan. Appendix A. • http: //www. tutorialspoint. com/uml_tutorial. pdf
- Slides: 14