Part 1 Structural Modeling Use case modeling

Slides:



Advertisements
Similar presentations
UML an overview.
Advertisements

Introduction to UML: Structural &Use Case Modeling
CIT731: Database Development Object Oriented Modeling (OOM)
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
2008/03/25 Unified Modeling Lanauage 1 Introduction to Unified Modeling Language (UML) – Part One Ku-Yaw Chang Assistant Professor.
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Object-Oriented Analysis and Design
Introduction To System Analysis and Design
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
UML Overview Unified Modeling Language Basic Concepts.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
7M822 UML Sequence Diagrams 2 December 2010.
Introduction to UML: Structural Modeling and Use Cases Qing Ding SSE USTC Object Modeling with OMG UML Tutorial Series © OMG and Contributors:
C++ Training Datascope Lawrence D’Antonio Lecture 11 UML.
1/31 CS 426 Senior Projects Chapter 1: What is UML? Chapter 2: What is UP? [Arlow and Neustadt, 2005] January 22, 2009.
© Copyright Eliyahu Brutman Programming Techniques Course.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
Itntroduction to UML, page 1 Introduction to UML.
Fall 2002 SJSU -- CmpE Enterprise & Application Frameworks Dr. M.E. Fayad, Professor Computer Engineering Department – RM# College of Engineering San José.
Unified Modeling Language
Chapter 7: The Object-Oriented Approach to Requirements
Page 1 What is the UML? UML stands for Unified Modeling Language The UML combines the best of the best from – Data Modeling concepts (Entity Relationship.
Object Modeling with UML: Introduction to UML Cris Kobryn Chief Technologist E.solutions, EDS November 1999 © 1999 OMG and Tutorial Contributors: EDS,
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.
Introduction to UML: Structural and Use Case Modeling Cris Kobryn Co-Chair UML Revision Task Force Object Modeling with OMG UML Tutorial Series ©
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
1 SYS366 Lecture Visual Modeling and Business Use Case Diagrams.
Lecture 3: Visual Modeling & UML 1. 2 Copyright © 1997 by Rational Software Corporation Computer System Business Process Order Item Ship via “ Modeling.
Use Case Modeling. What is use case modeling? Core concepts Diagram tour When to model use cases Modeling tips Example: Online HR System.
Introduction To System Analysis and Design
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Introduction to UML: Structural and Use Case Modeling.
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
Object-Oriented Analysis and Design NGSSC Object-Oriented Scientific Programming, June 2012.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Component & Deployment Diagram © copyright 2001 SNU OOPSLA Lab.
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
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.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
UML as a Specification Language for Embedded Systems. By, Mir Ahmed Ali, Asst. Professor, ECM department, SNIST. By, Prof. Narsiah sir, Director of School.
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
Design Model Lecture p6 T120B pavasario sem.
Introduction to OOAD and the UML
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Lecture 14 22/10/15. The Object-Oriented Analysis and Design  Process of progressively developing representation of a system component (or object) through.
OOD OO Design. OOD-2 OO Development Requirements Use case analysis OO Analysis –Models from the domain and application OO Design –Mapping of model.
1 SYS366 Week 2 - Lecture 2 Visual Modeling & UML.
SWE 214 (071) Introduction to UML Slide 1 Introduction to UML.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 14 Slide 1 Object-Oriented Design.
1 An Overview of UML. 2 The Unified Modeling Language UML is a graphical language used by software engineers to model software systems during development.
UML (Unified Modeling Language)
UML AN OVERVIEW. Topics covered in this Session 1. Introducing UML. 2. What constitutes the UML. 3. Concepts of UML.
1 Advanced DataBases Unified Modelling Language An Introduction and Use Case Lecture 2 Susan Curtis.
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Introduction to UML: Structural and Use Case Modeling
Object-Oriented Analysis and Design
Unified Modeling Language
UML: Unified Modeling Language
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Presentation transcript:

Part 1 Structural Modeling Use case modeling Introduction to UML Part 1 Structural Modeling Use case modeling

Overview UML – background Quick tour of a subset of UML Structural modeling – Class Diagrams Essentials More advanced features Use case modeling - Use Case Diagrams Behavioral Modeling - Event Diagrams, State Diagrams.

The Challenge Tijuana “shantytown”: http://www.macalester.edu/~jschatz/residential.html

The Vision Fallingwater: http://www.adelaide.net.au/~jpolias/FLW/Images/FallingWater.jpeg

Quick Tour The UML is a graphical language for specifying visualizing constructing documenting the artifacts of software systems Added to the list of OMG adopted technologies in November 1997 as UML 1.1 Most recent minor revision is UML 1.3 (November 1999)

UML Goals Define an easy-to-learn but semantically rich visual modeling language Unify the Booch, OMT, and Objectory modeling languages Include ideas from other modeling languages Incorporate industry best practices Address contemporary software development issues scale, distribution, concurrency, executability, etc. Provide flexibility for applying different processes Enable model interchange and define repository interfaces

OMG UML Contributors Contributors = Original Submitters + RTF1 + RTF2 + … Microsoft ObjecTime Oracle Ptech OAO Technology Solutions Rational Software Reich SAP Softeam Sterling Software Sun Taskon Telelogic Unisys … Aonix Colorado State University Computer Associates Concept Five Data Access EDS Enea Data Hewlett-Packard IBM I-Logix Inline Software Intellicorp Klasse Objecten Lockheed Martin

UML The basic building blocks of UML are: model elements (classes, objects, components, use cases, etc.) relationships (associations, generalization, dependencies, etc.) Depicted via diagrams: class, object diagrams use case diagrams sequence (event) diagram activity diagrams collaboration diagram package diagram deployment diagram

Structural, Use case and Behavioral modeling Structural model: shows the static structure of the model the entities that exist (e.g., classes, interfaces, components, nodes), their internal structure and relationship to other entities does not include temporal information Class&Object Diagrams (Analysis and Design) Component and Deployment Diagrams (Design and Implem.) does not include interaction (message connections) Use case model -specifies system requirements in OO manner Use case diagram and description Behavioral/interaction model Sequence (event) diagram, Activity diagram State diagram

Class Diagram and Object Diagram Shows static structure of concepts Concepts and Classes, Types (interfaces to software components) Relations between them Can be shown on various levels of granularity (example on the next slide)

Example: Class specification, 3 levels

Classes: method body

Generalization

Generalization

Associations (a.k.a. Instance Connections) and Association Classes Notice: Multiplicity labels are placed in reverse-order of Coad-Yourdon OOA Associations can be labeled and directed. Job – is an association class. Implies One Job per each Person-Company association. Job * 1..* Company Person employer employee Job salary

Aggregation and Composition Both represent whole-part relationship, but are defined differently by different people Aggregation (white diamond) Composition (black diamond) is a stronger notion: parts do not exists outside of whole, each part belongs to a single whole.

Note directionality (a.k.a. Navigability) of the connection and label.

Many ways of depicting Composition Window scrollbar [2]: Slider title: Header body: Panel Window 1 1 1 scrollbar 2 title 1 body 1 Slider Header Panel

Composition Fig. 3-36, UML Notation Guide

Advanced Concepts Qualified associations Parameterized classes (a.k.a templates) Types and Implementation Classes Interfaces

Qualified Associations Account# is the qualifier of Bank-Person association means Unique instance of Account # per each Bank-Person association. Thus, all access to Person in connection to a Bank requires the value of Account #. Bank Account # Person 0..1

Parameterized Classes a.k.a. Templates Example: class Set – represents a collection of objects of a class. That class becomes a parameter to the parameterized class e.g. set of coins, set of students, set of <T> Parameter Parameterized Class T T Set StudentSet Insert(T) Remove(T) “bind” T to Student Unlike with specialization, Class StudentSet cannot add Attributes nor Services

Types and Implementation Classes Type – specifies the behavioral model Implementation Classes defines the implementing data structure and methods for the stereotype HashTable 1 T <<type>> Set T T Insert(T) <<implementatuibClass>> HashTableSet Remove(T) InSet?(T) Insert(T) Remove(T) InSet?(T) SetTableSize(size) realization

Interface Classes Interface – a named set of operations that characterize the behavior of an element Interface Classes – similar idea to purely Abstract Classes (no instances), but have no Attributes.Interfaces are realized by implementing them classes

Structural Modeling: Summary of Notation

Structural Modeling: Summary of Notation ¹ An extension mechanism useful for specifying structural elements.

Structural Modeling:Relationships

Structural Modeling: Relationships

Structural Modeling Tips Define a “skeleton” (or “backbone”) that can be extended and refined as you learn more about your domain. Focus on using basic constructs well; add advanced constructs and/or notation only as required. Defer implementation concerns until late in the modeling process. Structural diagrams should emphasize a particular aspect of the structural model contain classifiers at the same level of abstraction Large numbers of classifiers should be organized into packages

When to model structure Adopt an opportunistic top-down+bottom-up approach to modeling structure Specify the top-level structure using “architecturally significant” classifiers and model management constructs (packages, models, subsystems; see Tutorial 3) Specify lower-level structure as you discover detail re classifiers and relationships If you understand your domain well you can frequently start with structural modeling; otherwise If you start with use case modeling (as with a use-case driven method) make sure that your structural model is consistent with your use cases If you start with role modeling (as with a collaboration-driven method) make sure that your structural model is consistent with your collaborations

Use Case Modeling What is use case modeling? Core concepts Diagram tour When to model use cases Modeling tips Example: Online HR System

Use case modeling use case model: a view of a system that emphasizes the behavior as it appears to outside users. A use case model partitions system functionality into transactions (‘use cases’) that are meaningful to users (‘actors’). Actors are people or other systems

Use Case Modeling: Core Elements

Use Case Modeling: Core Relationships <<extend>>

Use Case Modeling: Core Relationships (cont’d) <<include>>

Use Case Diagram Tour Shows use cases, actor and their relationships Use case internals can be specified by text and/or interaction diagrams Kinds use case diagram use case description

Use Case Diagram Fig. 3-44, UML Notation Guide

Use Case Relationships

Actor Relationships Fig. 3-46, UML Notation Guide

Use Case Description: Change Flight Itinerary Actors: traveler, client account db, airline reservation system Preconditions: Traveler has logged on to the system and selected ‘change flight itinerary’ option Basic course System retrieves traveler’s account and flight itinerary from client account database System asks traveler to select itinerary segment she wants to change; traveler selects itinerary segment. System asks traveler for new departure and destination information; traveler provides information. If flights are available then … System displays transaction summary. Alternative courses If no flights are available then …

When to model use cases Model user requirements with use cases. Model test scenarios with use cases. If you are using a use-case driven method start with use cases and derive your structural and behavioral models from it. If you are not using a use-case driven method make sure that your use cases are consistent with your structural and behavioral models.

Use Case Modeling Tips Make sure that each use case describes a significant chunk of system usage that is understandable by both domain experts and programmers When defining use cases in text, use nouns and verbs accurately and consistently to help derive objects and messages for interaction diagrams (see Lecture 2) Factor out common usages that are required by multiple use cases If the usage is required use <<include>> If the base use case is complete and the usage may be optional, consider use <<extend>> A use case diagram should contain only use cases at the same level of abstraction include only actors who are required Large numbers of use cases should be organized into packages (see Lecture 3)

Example: Online HR System

Online HR System: Use Case Relationships

Online HR System: Update Benefits Use Case Actors: employee, employee account db, healthcare plan system, insurance plan system Preconditions: Employee has logged on to the system and selected ‘update benefits’ option Basic course System retrieves employee account from employee account db System asks employee to select medical plan type; include Update Medical Plan. System asks employee to select dental plan type; include Update Dental Plan. … Alternative courses If health plan is not available in the employee’s area the employee is informed and asked to select another plan...

Ideas to Take Away UML is effective for modeling large, complex software systems It is simple to learn for most developers, but provides advanced features for expert analysts, designers and architects It can specify systems in an implementation-independent manner 10-20% of the constructs are used 80-90% of the time Structural modeling specifies a skeleton that can be refined and extended with additional structure and behavior Use case modeling specifies the functional requirements of system in an object-oriented manner

References OMG UML Specification v. 1.3, OMG doc# ad/06-08-99 available from many urls, including http://www.jeckle.de/files/omg-uml-1.3.pdf [Kobryn 00] UML 2001: A Standardization Odyssey, Communications of the ACM, Oct. 1999. [Kobryn 99] Object Modeling with UML: Introduction to UML, Tutorial, available from http://cgi.omg.org/cgi-bin/doc?omg/99-11-04 [Fowler (with Scott)] UML Distilled, Addison-Wesley