1 Introduction to UML DIAGRAMS & CLASS DIAGRAM Chapter 7,8 主講人 : 許勝杰

Slides:



Advertisements
Similar presentations
UML Diagrams Jung Woo. What is UML? Standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems, business.
Advertisements

UML (Sequence Diagrams, Collaboration and State Chart Diagrams) Presentation By - SANDEEP REDDY CHEEDEPUDI (Student No: ) - VISHNU CHANDRADAS (Student.
1 Behavioral Modeling Chapter 8. 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports business processes.
A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
Lecture 12: Chapter 22 Topics: UML (Contd.) –Relationship Structural Behavioral –Diagram Structural Behavioral.
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
Unified Modeling (Part I) Overview of UML & Modeling
1 UML Component and Deployment Diagrams. Models, Views, and Diagrams Use Case Diagrams Use Case Diagrams Use Case Diagrams Scenario Diagrams Scenario.
C++ Training Datascope Lawrence D’Antonio Lecture 11 UML.
© Copyright Eliyahu Brutman Programming Techniques Course.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
Unified Modelling Language (UML)
Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
UML Unified Markup Language Ziya Karakaya Atılım University, Computer Engineering
Kris Horn Santhoshi Smitha Thota Uday Chandra Karrotthi.
Class, Sequence and UML Model.  Has actors and use cases.
Introduction to UML 1 Quick Tour Why do we model? What is the UML? Foundation elements Unifying concepts Language architecture Relation to other OMG technologies.
UNIT- Venkata Ratnam K1 BEHAVIORAL MODELING.
1 Interaction diagrams and activity diagrams Speaker: 陳 奕 全 Real-time and Embedded System Lab 15 August 2002.
Behavioral Modeling Chapter 8.
CS /31 Illinois Institute of Technology CS487 Software Engineering OOA with UML David Lash.
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
ניתוח מערכות מידע 1 Unified Modeling Language (UML) § § The Unified Modeling Language (UML) is the industry-standard language for: Specifying, Visualizing,
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
TAL7011 – Lecture 4 UML for Architecture Modeling.
Implementation Diagrams
1 An Introduction to UML Interaction (Sequence and Communication) Diagrams Georgia State University CIS 3300 Spring, 2009.
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
UML Diagrams CSC 422 Kutztown University Dr. Daniel Spiegel.
Unified Modelling Language (UML) Software Engineering Lab. Sharif University of Technology.
CIM LAB MEETING Presentation on UML Rakesh Mopidevi Kwangyeol Ryu.
Software Engineering Lecture 8 Object-Oriented Analysis.
OMT Modeling 1. Object Model : presented by the object model and the data dictionary. 2. Dynamic Model: presented by the state diagrams and event flow.
©2007 · Georges Merx and Ronald J. NormanSlide 1 Chapter 15 The Unified Modeling Language: a Primer.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Week 04 Object Oriented Analysis and Designing. What is a model? A model is quicker and easier to build A model can be used in simulations, to learn more.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Chapter 3: Introducing the UML
Class Diagrams. Terms and Concepts A class diagram is a diagram that shows a set of classes, interfaces, and collaborations and their relationships.
Introduction to UML Hazleen Aris Software Eng. Dept., College of IT, UNITEN. …Unified Modeling Language.
Communication Diagrams Lecture 8. Introduction  Interaction Diagrams are used to model system dynamics  How do objects change state?  How do objects.
1 Architectural Blueprints—The “4+1” View Model of Software Architecture (
Technical Module C Object Modeling Objects Object – a valuable resource: Money (Account Receivable) Material (Product) Machines (Delivery Truck) Personnel.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Diagrams. Typically, we view the static parts of a system using one of the four following diagrams. 1. Class diagram 2. Object diagram 3. Component diagram.
Class diagram Lection №2. Plan  Class: name, attributes, operations.  Relationships between classes.  Interfaces.  Objects.  Templates.  Recommendations.
ITEC1301 Object-Oriented Systems Construction Lecture Notes #4 1.
1 Systems Analysis and Design Behavioral Modeling Chapter 8 (Last one before the Midterm!)
CHAPTER
UML Diagrams By Daniel Damaris Novarianto S..
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Object-Oriented Analysis and Design
Systems Analysis and Design With UML 2
Unified Modeling Language
Dynamic Modeling of Banking System Case Study - II
Introduction to Unified Modeling Language (UML)
UML Diagrams Jung Woo.
Online Shopping APP.
UML dynamic Modeling (Behavior Diagram)
Software Architecture & Design Pattern
Interactions.
UML Overview Part 2.
Unified Modeling Language
Object oriented analysis and design
Design Yaodong Bi.
Uml diagrams In ooad.
Presentation transcript:

1 Introduction to UML DIAGRAMS & CLASS DIAGRAM Chapter 7,8 主講人 : 許勝杰

2 Outline Different Views of a System Different Views of a System Diagrams Diagrams Structural Diagrams Structural Diagrams Behavioral Diagrams Behavioral Diagrams Class Diagram Class Diagram Examples : An ATM System Examples : An ATM System

3 Different Views of a System A view is a projection into the organization and structure of a system’s model, focused on one aspect of a system. A view is a projection into the organization and structure of a system’s model, focused on one aspect of a system. Five most important views : Five most important views : Use case view: force the shape of system. Use case view: force the shape of system. Design view: function requirements. Design view: function requirements. Process view: concurrency, synchronization. Process view: concurrency, synchronization. Implementation view: component and files assemble the physical system. Implementation view: component and files assemble the physical system. Deployment view: nodes form H/W topology Deployment view: nodes form H/W topology

4 Diagrams A diagram is a graphical projection into the elements that make up a system. A diagram is a graphical projection into the elements that make up a system. Each diagram provides a view into the elements that make up the system. Each diagram provides a view into the elements that make up the system. Structural diagrams to view the static parts and Behavioral diagrams to view the dynamic parts of a system. Structural diagrams to view the static parts and Behavioral diagrams to view the dynamic parts of a system.

5 Structural Diagrams The UML’s structural diagrams are used to visualize, specify, construct, and document the static aspects of a system. The UML’s structural diagrams are used to visualize, specify, construct, and document the static aspects of a system. Static aspects: represent system’s relatively stable skeleton and scaffolding. Static aspects: represent system’s relatively stable skeleton and scaffolding. UML’s four structural diagrams: UML’s four structural diagrams: Class diagrams Class diagrams Object diagrams Object diagrams Component diagrams Component diagrams Deployment diagrams Deployment diagrams

6 Structure Diagrams - Class Diagrams A class diagram shows a set of classes, interfaces, and collaborations and their relationship. A class diagram shows a set of classes, interfaces, and collaborations and their relationship. Class diagrams are used to illustrate the static design view of a system. Class diagrams are used to illustrate the static design view of a system. Class diagrams including active classes are used to address the static process view of a system. Class diagrams including active classes are used to address the static process view of a system.

7 Structure Diagrams - Object Diagrams A object diagram show a set of objects and their relationships. A object diagram show a set of objects and their relationships. Object diagrams are used to illustrate data structures, the static snapshots of instances of the things founds in class diagrams. Object diagrams are used to illustrate data structures, the static snapshots of instances of the things founds in class diagrams. Object diagrams address the static design view of a system just as do class diagrams, but from the perspective of real or prototypical case. Object diagrams address the static design view of a system just as do class diagrams, but from the perspective of real or prototypical case. Ref. P.196, Fig 14-1 Ref. P.196, Fig 14-1 Ref. P.196, Fig 14-1 Ref. P.196, Fig 14-1

8 Structure Diagrams - Component Diagrams A component diagram shows a set of components and their relationships. A component diagram shows a set of components and their relationships. Component diagrams are used to illustrate static implementation view of a system. Component diagrams are used to illustrate static implementation view of a system. A component typically maps to one or more classes, interfaces, or collaborations. A component typically maps to one or more classes, interfaces, or collaborations. Ref. P.394, Fig.29-1 Ref. P.394, Fig.29-1 Ref. P.394, Fig.29-1 Ref. P.394, Fig.29-1

9 Structure Diagrams - Deployment Diagrams A deployment diagram shows a set of nodes and their relationships. A deployment diagram shows a set of nodes and their relationships. Deployment diagrams illustrate the static deployment view of an architecture. Deployment diagrams illustrate the static deployment view of an architecture. Ref. P.408, Fig Ref. P.408, Fig Ref. P.408, Fig Ref. P.408, Fig. 30-1

10 Behavioral Diagrams The UML’s behavioral diagrams are used to visualize, specify, construct, and document the dynamic aspects of a system. The UML’s behavioral diagrams are used to visualize, specify, construct, and document the dynamic aspects of a system. Dynamic aspects: represent a system’s changing parts. Dynamic aspects: represent a system’s changing parts. UML’s five behavioral diagrams UML’s five behavioral diagrams Use case diagrams Use case diagrams Sequence diagrams Sequence diagrams Collaboration diagrams Collaboration diagrams Statechart diagrams Statechart diagrams Activity diagrams Activity diagrams

11 Behavioral Diagrams- Use Case Diagram A use case shows a set of use cases and actors and their relationships. A use case shows a set of use cases and actors and their relationships. Used to illustrate the static use case view of a system. Used to illustrate the static use case view of a system. Especially important in organizing and modeling the behaviors of a system. Especially important in organizing and modeling the behaviors of a system.

12 Behavioral Diagrams- Sequence Diagram A sequence diagram is an interaction diagram that emphasizes the time ordering of messages. A sequence diagram is an interaction diagram that emphasizes the time ordering of messages. It shows a set of objects and the messages sent and received by those objects. It shows a set of objects and the messages sent and received by those objects. Used to illustrate the dynamic view of a system. Used to illustrate the dynamic view of a system.

13 Behavioral Diagrams- Collaboration Diagram A collaboration diagram is an interaction diagram that emphasize the structural organization of objects that send and receive messages. A collaboration diagram is an interaction diagram that emphasize the structural organization of objects that send and receive messages. It shows a set of objects, links among those objects, and messages sent and received by those objects. It shows a set of objects, links among those objects, and messages sent and received by those objects. Used to illustrate dynamic view of a system. Used to illustrate dynamic view of a system.

14

15 Behavioral Diagram- Statechart Diagram A statechart diagram shows a state machine, consisting of states, transitions, events, and activities. A statechart diagram shows a state machine, consisting of states, transitions, events, and activities. Especially important in modeling the behavior of an interface, class, or collaboration. Especially important in modeling the behavior of an interface, class, or collaboration. It emphasizes the event-ordered behavior of an object, which is especially useful in modeling reactive systems. It emphasizes the event-ordered behavior of an object, which is especially useful in modeling reactive systems. Illustrating dynamic view of a system. Illustrating dynamic view of a system.

16 Statechart Diagram (p.333)Activity Diagram (p.259)

17 Behavioral Diagrams- Activity Diagram An activity diagram shows the flow from activity to activity within a system. An activity diagram shows the flow from activity to activity within a system. It shows a set of activities, the sequential or branching flow from activity to activity, and objects that act and are acted. It shows a set of activities, the sequential or branching flow from activity to activity, and objects that act and are acted. Especially important in modeling the function of a system. Especially important in modeling the function of a system. It emphasizes the flow of control among objects. It emphasizes the flow of control among objects.

18 Class Diagram Class diagram commonly contains the following things: Class diagram commonly contains the following things: Classes Classes Interfaces Interfaces Collaborations Collaborations Dependency, generalization, and association relationships. Dependency, generalization, and association relationships. It may also contains notes and constraints, packages or subsystems It may also contains notes and constraints, packages or subsystems

19 Class Diagram Example: Example: Fig 8-1 p.106

20 Class Diagram A well-structured class diagram A well-structured class diagram Focused on communicating one aspect of a system’s static design view Focused on communicating one aspect of a system’s static design view Contain only elements that are essential to understanding that aspect Contain only elements that are essential to understanding that aspect Provides detail consistent with its level of abstraction, with adornments that are essential for understanding Provides detail consistent with its level of abstraction, with adornments that are essential for understanding Is not so minimalist that it misinform readers about important semantics. Is not so minimalist that it misinform readers about important semantics.

21 Class Diagram When drawing a class diagram: When drawing a class diagram: Give name communicating its purpose. Give name communicating its purpose. Layout elements with minimal cross line Layout elements with minimal cross line Semantically close, lay out close. Semantically close, lay out close. Use notes and color to draw attention to important features of system. Use notes and color to draw attention to important features of system. Try not to show too many kinds of relationships. Try not to show too many kinds of relationships.

22 An Example – ATM System The ATM system. The ATM system. Model collaboration Model collaboration Identify the mechanism. Identify the mechanism. Identify the classes, interface of each mechanism. Identify the classes, interface of each mechanism. Use scenarios to walk through these things. Use scenarios to walk through these things. Populate these elements with their contents. Populate these elements with their contents.

23 An Example – ATM System 密碼 金額 金融卡 櫃員機 checkCard() checkPW () getMoney() 顧客 inputCard() inputPW() inputMoney() 1..*

24 Object Diagram

25 Component Diagram

26 Deployment Diagram