SYSTEM AND SOFTWARE DESIGN USING THE UNIFIED MODELING LANGUAGE (UML)

Similar documents
Information Technology Audit & Cyber Security

CS/IT Secure Software Construction

Requirements Analysis

Requirements Engineering

Development Process and Analysis. LTOOD/OOAD - Verified Software Systems 1

An Introduction to Use Cases

EE 446 EMBEDDED ARCHITECTURE Embedded System in UML

Requirements Analysis. Overview

4. Draw correct class diagram for the following scenario. City bicycle rental system Many cities have deployed a bicycle rental system.

Object-Oriented Analysis/Design and Use Cases Object Oriented Analysis and Design

Babu Madhav Institute of Information Technology, UTU 2017

FlexOne. Your full guide. Just ask in branch Visit nationwide.co.uk/flexone Call Building Society

Use cases. Paul Jackson. School of Informatics University of Edinburgh

Requirements Use Cases

An Introduction to Use-Case Modeling

Requirements Engineering

Software Engineering Fall 2014

BUSINESS PROCESS MODELLING Primer Version 0.2

BvPOS Extension Features

System Sequence Diagrams

NOTE: Close any security window that pops up (McAfee, MalwareBytes, etc.)

Thomson Learning DOCUMENTING ACCOUNTING SYSTEMS LEARNING OBJECTIVES

Requirements Analysis. Requirements Analysis is Hard

E-Procurement Reference Model for Small Government Department

Say hello to your new Visa Debit Card

Sales Order Management Process Overview

User Stories and Use Cases

Becoming a Lowes Front End Cashier

ONE BUSINESS - ONE APP USER MANUAL

BARC 2.0 PRDv1. Team Yao and Friends : Problem:

Software Engineering Fall 2014

Comp435 Object-Oriented Design. Requirements and Use Cases. Requirements Analysis. Outline. Requirements Analysis. Requirements change

Use-Case Diagram. Contents. Introduction. 1. Introduction. User-Centred Design (UCD) Users Requirements

SCOOTER S COFFEE MOBILE APP REFERENCE GUIDE

Conceptual Modeling. Conceptual Modeling. Class diagrams (POS Example) Modeling the Problem Domain

Plan. Start looking at how to model the system s requirements Identify and list. Describe use cases Draw Use Case Diagrams. user stories use cases

How to register on eposmart?

Order entry and fulfillment at Fabrikam: an ERP walkthrough

Software Engineering (CSC 4350/6350) Rao Casturi

PART II Inception. Chapter 4 Inception is Not the Requirements Phase. development cycle. phase. iteration. inc. elaboration construction transition

Four threads 8 Aug 11

Product Requirements Documentation: Use Cases

System Sequence Diagrams. CSC 440: Software Engineering Slide #1

Solar Eclipse Standard Operating Procedures Shipping

Process Specifications. and process modelling

Software Engineering (CSC 4350/6350) Rao Casturi

Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm. Rao Casturi 09/08/2015

Workflow and Business Process Modeling with UML Activity Diagrams. April 17, 2008

How to Find Use Cases from Business Process (BPMN)? Written Date : February 17, 2014

Raising MoneySmart Kids and Teens Tips

Requirements Analysis

Purchase Order/Goods Received Notes

CHAPTER 3 Use Cases. 3. Use Cases

CHAPTER 3 Use Cases. 3. Use Cases

-Step Guide to Selling More Through Personalization. 3www.como.com

Top 10 Marketing Mistakes Even the Smartest Companies Make And How You Can Avoid Them

MSO Analysis & UML 2

Functional Guide for the Promotion Calculation Engine

Not All Chatbots are Created Equal: The Intelligence Question

Managing Point of Sale Sessions

Explain the needs, goals, and pain points addressed. [The Customer] About. Main Goals. Pain Points

TABLE OF CONTENTS (0) P a g e

AvaTax Magento 1 Extension. User Guide

Graphical Systems Modeling with UML / SysML Activity diagrams

KF5008 Program Design & Development. Introduction to the Module

Daily Operations Guide

How does DEFT POS work?

The Value of Receipts: Printed and Digital

Order entry and fulfillment at Fabrikam: an ERP walkthrough

Virtual money in vacation resort

PRODUCT DEVELOPMENT WORKSHEET

Auction Host Training 2018

ReCPro TM User Manual Version 1.15

Say hello to your new Visa Debit Card

YOUR GUIDE TO. Version 1.0. Not FDIC Insured May Lose Value No Bank Guarantee

Browse to and login A First Time visitor must follow the Register your card link to create a User Name and Password.

UC Santa Barbara. CS189A - Capstone. Chandra Krintz Department of Computer Science UC Santa Barbara

Pocket Salon Booking. salonbiz.com

Agile versus? Architecture

Sage 50 Accounts Why upgrade from Sage 50 Accounts 2011

Requirements Engineering Unit 4: Requirements modeling, specification & prioritization

Connectathon Monitor Training Document

Starter Account. Your bio on espeakers feeds into our chapter website Find a Candidate Speaker Page

Hospitality user guide

Teacher's Guide. Lesson Two. Money Responsibility 04/09

IMAGINE IOT PROTOTYPE CHALLENGE SMART SHOPPING CART PROTOTYPE

5 Extending the Requirements Models

Employer s Guide To Telehealth. Reshaping Access To Quality Healthcare For Your Employees.

Unit 6 Good Choice. What is the most important thing to consider when you buy a product? Rank them 1 4. (1 = most important) Answer the question.

Zebra s Repair Order Portal for Partners COURSE CODE: RPE01

A Brief Tour of Responsibility- Driven Design in Rebecca Wirfs-Brock

What is Venmo? Is Venmo safe? What is the cost? How is Venmo related to O&M?

4 POS MANUAL. Contents

Yes, You DO Need Visual IVR Frequently Asked Questions

Full file at

Paper Reference IT Paper Reference(s) IT101/01 Edexcel Principal Learning Information Technology Level 1 Unit 1: Technology in Organisations

3.0 INTRODUCTION 3.1 OBJECTIVES 3.2 CLASS DIAGRAM

ACS 3907 E-Commerce. Instructor: Kerry Augustine January 24 th Bowen Hui, Beyond the Cube Consulting Services Ltd.

Consignee Guide. Version 1.8

Elizabeth Larson, CBAP, PMP, CSM CEO, Watermark Elizabeth Larson

Transcription:

Michael Weintraub And Frank Tip SYSTEM AND SOFTWARE DESIGN USING THE UNIFIED MODELING LANGUAGE (UML) Thanks go to Martin Schedlbauer and to Andreas Zeller for allowing incorporation of their materials

WHY MODEL A SYSTEM? Helps clarify the requirements Identifies gaps Useful tool for understanding how the details really fit in or fit together 2

A PICTURE IS WORTH A THOUSAND WORDS 3

UNIFIED MODELING LANGUAGE UML is a general-purpose visual modeling language developed by an industry consortium in 1997. Presently, UML is in version 2.2 and is controlled by the Object Management Group (OMG). UML is based on multiple prior visual modeling languages, most notably the Booch Notation, OMT, and OOSE. 4

UML IS COMPLICATED Class Component Object Profile Composite Structure Deployment Package Static Structure Diagrams Use Case Activity State Sequence Communication Interaction Overview Timing Dynamic Behavior Diagrams 5

UML IS COMPLICATED Class Component Object Profile Composite Structure Deployment Package Static Structure Diagrams Use Case Activity State Sequence Communication Interaction Overview Timing Dynamic Behavior Diagrams Use What You Need. You Probably Don t Need Everything. 6

WAIT, WHY CAN T WE JUST START CODING? Challenges Need to understand what the system does and how it is structured Especially important for large/complex systems, need to get a handle on the complexity What UML provides Useful for visualizing a system 1 picture = 1000 words Specifies the system structure and/or behavior Provides guidelines for constructing an implementation Documents the important design decisions Facilitates communication between developers and between developers and clients Common language for expressing design elements that is both technical and non-computer technical accessible Facilitates reverse engineering: reconstruct a model from an existing implementation Often to re-implement in another language 7

THERE ARE MANY WAYS TO DESCRIBE A SYSTEM 1. External The system context or environment 2. Interaction How the system interacts with its environment, users, or components 3. Structural The system s organization or data 4. Behavioral The system s dynamic behavior and how it responds to events 8

Network THE EXTERNAL PERSPECTIVE Places the system in context Data Entry Subsystem UPC Code Good for identifying what is part of the system and what is not part of the system Pricing Customer Information The boundaries may not always be clear Cash Drawer Subsystem Scanner Subsystem Typical Checkout System (aka Cash Register) Coupons 9

THE INTERACTION PERSPECTIVE How the system interacts with its environment, users, or components 1. Use Case Diagrams How actors interact with a system Especially useful for requirements gathering and initial work with clients 2. Sequence Diagrams How entities operate with one another in specific order Other diagram types are available 10

LET S START WITH A SIMPLE EXAMPLE: ORDERING COFFEE AT A COFFEE SHOP 1. (start) Customer approaches the counter and tells the cashier what she wants 2. The cashier enters the beverage order into the point-of-sale system (POS) 3. The cashier asks for the customer s name and notes it on the order 4. The customer pays for the order 5. The cashier records the payment 6. The cashier communicates the order details to the barista 7. The barista prepares the beverage order 8. Upon completion of the order, the barista places the beverage on the pick-up counter and calls the customer s name 9. The customer picks up the beverage and walks away (end). 11

THE STORY IS RICH IN INFORMATION 1. (start) Customer approaches the counter and tells the cashier what she wants 2. The cashier enters the beverage order into the point-of-sale system (POS) 3. The cashier asks for the customer s name and notes it on the order 4. The customer pays for the order 5. The cashier records the payment 6. The cashier communicates the order details to the barista 7. The barista prepares the beverage order 8. Upon completion of the order, the barista places the beverage on the pick-up counter and calls the customer s name 9. The customer picks up the beverage and walks away.(end) 12

THE STORY IS RICH IN INFORMATION 1. (start) Customer approaches the counter and tells the cashier what she wants 2. The cashier enters the beverage order into the point-of-sale system (POS) 3. The cashier asks for the customer s name and notes it on the order 4. The customer pays for the order Actors and Objects 5. The cashier records the payment 6. The cashier communicates the order details to the barista 7. The barista prepares the beverage order 8. Upon completion of the order, the barista places the beverage on the pick-up counter and calls the customer s name 9. The customer picks up the beverage and walks away.(end) 13

THE STORY IS RICH IN INFORMATION 1. (start) Customer approaches the counter and tells the cashier what she wants 2. The cashier enters the beverage order into the point-of-sale system (POS) 3. The cashier asks for the customer s name and notes it on the order 4. The customer pays for the order Systems 5. The cashier records the payment 6. The cashier communicates the order details to the barista 7. The barista prepares the beverage order 8. Upon completion of the order, the barista places the beverage on the pick-up counter and calls the customer s name 9. The customer picks up the beverage and walks away.(end) Actors and Objects 14

THE STORY IS RICH IN INFORMATION 1. (start) Customer approaches the counter and tells the cashier what she wants 2. The cashier enters the beverage order into the point-of-sale system (POS) 3. The cashier asks for the customer s name and notes it on the order 4. The customer pays for the order Actions 5. The cashier records the payment 6. The cashier communicates the order details to the barista 7. The barista prepares the beverage order 8. Upon completion of the order, the barista places the beverage on the pick-up counter and calls the customer s name 9. The customer picks up the beverage and walks away.(end) Actors and Objects Systems 15

THE STORY IS RICH IN INFORMATION 1. (start) Customer approaches the counter and tells the cashier what she wants 2. The cashier enters the beverage order into the point-of-sale system (POS) 3. The cashier asks for the customer s name and notes it on the order 4. The customer pays for the order Events 5. The cashier records the payment 6. The cashier communicates the order details to the barista 7. The barista prepares the beverage order 8. Upon completion of the order, the barista places the beverage on the pick-up counter and calls the customer s name 9. The customer picks up the beverage and walks away.(end) Actors and Objects Systems Actions 16

NEED: REPRESENT SYSTEMS, ACTORS AND OBJECTS, ACTIONS, AND EVENTS AND HOW THEY COME TOGETHER Need to see both the forest and the trees 17

USE CASE DIAGRAMS How actors interact with a system An actor is a prospective user It can also be external systems A scenario is a sequence of steps between an actor and the system Lists the steps in each successful and unsuccessful scenario that make up the interaction Usually written as prose A use case is a set of scenarios with a common user goal One can distinguish business use cases from system use cases Business process design versus system process design Design hint: a use case shows what a system does, not how it does it keep descriptions short, clear, and precise separate main flow of events from alternate and exceptional flows Especially useful for requirements gathering and initial work with clients 18

USE CASE 0 : ORDERING AT A COFFEE SHOP FROM THE CASHIER S PERSPECTIVE 1. (start) Customer approaches the counter, cashier hears what customer orders 2. The cashier enters the customer order into the point-of-sale system (POS) 3. The cashier asks customer for a name and notes name on the customer order 4. The cashier gets the customer s money to cover the order 5. The cashier records the payment 6. The cashier communicates the order s details to the barista 7. (end) Guide: actor action objects-of-action 20

USE CASE 0 : NOW AN ALTERNATIVE 1. (start) Customer approaches the counter, cashier hears what customer orders a. If the store is presently out of the materials needed for the order, cashier tells customer we are out of X and suggests a near alternative b. cashier hears what customer orders instead 2. The cashier enters the customer order into the point-of-sale system (POS) 3. The cashier asks customer for a name and notes name on the customer order 4. The cashier gets the customer s money to cover the order 5. The cashier records the payment 6. The cashier communicates the order s details to the barista 7. (end) Guide: actor action objects-of-action 21

USE CASE 0 : ORDER FROM THE WEB 1. (start) Customer start app on his phone and logs in. 2. Customer picks preferred store. 3. Customer enters coffee choice. 4. App asks if he would like anything else. 5. Customer selects checkout. 6. App asks for payment. 7. Customer enters credit card number. 8. App validates the order. 9. Once done, App sends the order to the POS machine at preferred store and leaves a confirm message in the customer s email inbox. 10. The cashier communicates the order s details to the barista 11. (end) Guide: actor action objects-of-action 22

WRITING USE CASE DIAGRAMS IN UML Use cases: oval with text inside Actors: stick figure Dependencies, generalizations, associations actor a use case take customer order cashier Association between actor and use case Actors are really roles played by people. One person may play multiple roles. However, actors may also be another system. Actors and use cases each have names.

WRITING USE CASE DIAGRAMS IN UML login Validate login Place order Pick store Validate order customer Pay for order deliver order to store backend Pick up order Use Case 0 : Ordering coffee from the app

ONE WAY TO REDUCE NOTATIONS Use Case Generalization Child use case inherits behavior and meaning from parent use case Child may add or override parent behavior Child may be substituted wherever parent occurs Validate Client Parent Use Case Generalization Symbol and association Child Use Case Check Password Check Thumbprint Verify Retinal Scan

EXTENDING USE CASES Efficient way to model optional system behavior The extending use case may add behavior to the base use case, but: The base use case must declare certain extension points The extending use case may add additional behavior only at those extension points The Extended use case is meaningful on its own as it is independent of the extending use case. Place Order Extension points set priority <<extend>> (set priority) Place Rush Order Use Case 0 : Adding priority to Ordering coffee from the app

AVOIDING REPETITIVE DESCRIPTIONS Put common event flows into a use case of its own and then include it into the behavior of the (base) use case. The include relationship is used to: simplify large use case by splitting it into several use cases represent common parts of the behaviors of other use cases Place Order <<include>> Validate User ~~~ Place Order Validate User Track Order Track Order <<include>>

GUIDELINES FOR CHOOSING RELATIONSHIPS 1. Use <<include>> to avoid repetition when you are repeating yourself in two or more separate use cases 2. Use generalization when you are describing a variation on normal behavior, and you wish to describe it casually 3. Use <<extend>> when you are describing a variation on normal behavior and you wish to use the more controlled form, declaring your extension points in the base use case (taken from Martin Fowler s UML Distilled)

SEQUENCE DIAGRAMS Shows the flow between elements of a system (the messaging sequence) Classes (instances of classes) Components Subsystems Actors t Time is explicitly shown and flows from top to bottom Use Case 0 29

CONTROL FLOWS Conditional Flow Loops t Use Case 0 30

ADDITIONAL (USEFUL) NOTATIONS Activate Entity t 31

ADDITIONAL (USEFUL) NOTATIONS Activate Entity Destroy Entity t Deactivate Entity 32

ADDITIONAL (USEFUL) NOTATIONS Some time goes by t Specific amount of time goes by 33

ADDITIONAL (USEFUL) NOTATIONS t noteworthy internal messaging 34

SHIFTING GEARS: STATE state a condition or situation in the life on an object during which it satisfies some condition, performs some activity, or waits for some event typically described by a set of attribute values examples: a coffee pot: state depends on current amount of coffee, temperature, an order: state can be pending, in processing, fulfilled, cancelled, delivered,... Empty

SHIFTING GEARS: STATE state a condition or situation in the life on an object during which it satisfies some condition, performs some activity, or waits for some event typically described by a set of attribute values examples: a coffee pot: state depends on current amount of coffee, temperature, an order: state can be pending, in processing, fulfilled, cancelled, delivered,... State Value State Object (coffee pot) Empty

WHERE THERE ARE STATES, THERE ARE TRANSITIONS Events cause states to change state transitions are considered to be atomic (cannot be interrupted) state transitions may be labeled Event [ Guard ] / Action an event is a significant happening (a message or signal that is received) an action is associated with a transition a process that occurs quickly and is not interruptible a guard is a logical condition returns true or false Empty BrewStarts Filling

WHERE THERE ARE STATES, THERE ARE TRANSITIONS Events cause states to change state transitions are considered to be atomic (cannot be interrupted) state transitions may be labeled Event [ Guard ] / Action an event is a significant happening (a message or signal that is received) an action is associated with a transition a process that occurs quickly and is not interruptible Action/Event a guard is a logical condition returns true or false Empty BrewStarts Filling State i State Transition State j

MORE ON STATES & STATE TRANSITIONS Examples: 1. Credit card payment received 2. Payment received for order 3. Smart phone receives a call Some events do not cause state change self-transition A state may have an activity associated with it May take longer, and may be interrupted by event Fowler s notation: do /activity inside the state

STATE DIAGRAMS: CELL PHONE EXAMPLE Idle CallArrives Ringing Hangup Answer/ startmedia InCall

STATE DIAGRAMS: CELL PHONE EXAMPLE initial state event Idle CallArrives Triggerless Transition event transition Answer/ startmedia Ringing Hangup action InCall

CONCURRENCY

STATE DIAGRAM GUIDELINES Keep it simple if diagrams get too big: consider using composite states or...multiple objects trace through the states manually, compare against expected results Confirm that all states are reachable under some combination of events Confirm that no non-final state is a dead end

TO BE CONTINUED: MORE UML TO COME Class Diagrams Moving from Diagrams to Code.. 44