The Models are the Code - Executable UML

Slides:



Advertisements
Similar presentations
Requirements Elicitation and Use Case Diagrams
Advertisements

Withdrawal Transaction Use Case Primary Actor: Customer Pre-conditions: The customer must have a valid ATM card and PIN. Post-conditions: The customer.
Use Case Diagrams Damian Gordon.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
ESE Einführung in Software Engineering 7. Modeling Behaviour Prof. O. Nierstrasz.
Introduction to Software Engineering 7. Modeling Behaviour.
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
Use Case Modeling SJTU. Unified Modeling Language (UML) l Standardized notation for object-oriented development l Needs to be used with an analysis and.
A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
Sequence Diagrams. Introduction A Sequence diagram depicts the sequence of actions that occur in a system. The invocation of methods in each object, and.
CS3773 Software Engineering Lecture 03 UML Use Cases.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
Interaction Diagrams Activity Diagram State Machine Diagram
Object-Oriented Analysis and Design
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 5, Analysis: Dynamic Modeling.
Slide 1 Systems Analysis & Design CS183 Spring Semester Dr. Jonathan Y. Clark Course Website:
Lecture 4 Class Responsibility Collaboration Cards
Unified Modeling (Part I) Overview of UML & Modeling
Executable UML The Models are the Code - Executable UML Lecture 2 - Using Executable UML Paul Krause.
©Ian Sommerville 2006Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Modeling State-Dependent Objects Using Colored Petri Nets
C++ Training Datascope Lawrence D’Antonio Lecture 11 UML.
THE OBJECT-ORIENTED DESIGN WORKFLOW Statechart Diagrams.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 10: Statecharts.
SE-565 Software System Requirements More UML Diagrams.
Use Case Modeling. Use case diagram For each use case we develop  Object class diagram (with attributes only)  System sequence diagram (analysis) 
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
Executable UML The Models are the Code - Executable UML Lecture 8 - Interactions and Operations Paul Krause.
Executable UML The Models are the Code - Executable UML Lecture 3 - Modelling with Domains and Classes Paul Krause.
Dynamic Modeling Chapter 11 Part of Analysis Modeling Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: Review Session (Optional)
Systems Analysis and Design in a Changing World, 3rd Edition
Executable UML The Models are the Code - Executable UML Lecture 7 - Getting a Lifecycle Paul Krause.
UML-1 3. Capturing Requirements and Use Case Model.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
The Unified Modeling Language Part II Omar Meqdadi SE 2730 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Business Analysis with For PG MDI, Gurgaon Kamna Malik, Ph.D.
1 Graph Coverage (6). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
Dynamic Models Sequence Diagrams Collaboration Diagrams Activity Diagrams.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
Essentials of Visual Modeling w/ UML Instructor Notes
UML (Unified Modeling Language)
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 10: Statecharts.
UML - Development Process 1 Software Development Process Using UML.
Chapter 6: Structuring Requirements: Use Case Description and Diagrams Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
UML ACTIVITY DIAGRAM 1. Recap Formal Use Case diagram UML notation for use cases Examples 2.
Use Case Diagrams. Introduction In the previous Lecture, you saw a brief review of the nine UML diagrams. Now that you have the clear, you'll start to.
Object-Oriented Software Engineering CS288. UniS 2 Lecture 1 - Object-Orientation & UML Contents  Overview  Classifiers  Dynamic Behaviour  Static.
Object-Oriented Software Engineering CS288 Paul Krause.
1 Object-Oriented Static Modeling of the Banking System - III Lecture # 33.
UML AN OVERVIEW. Topics covered in this Session 1. Introducing UML. 2. What constitutes the UML. 3. Concepts of UML.
1 Object Oriented Analysis and Design System Events & Contracts.
Paul Ammann & Jeff Offutt
Marlon Dumas Institute of Computer Science
Dynamic Modeling of Banking System Case Study - I
Object-Oriented Static Modeling of the Banking System - I
Paul Ammann & Jeff Offutt
Marlon Dumas Institute of Computer Science
Presentation transcript:

The Models are the Code - Executable UML Lecture 10 – Wrapping things up Paul Krause

Subject Matter Partitioning Sally Shlaer and Stephen Mellor established the foundations for this approach in 1988 Object-oriented Systems Analysis - Modelling the World in Data Recognises that a system consists of a set of subject matters - domains Each domain consists of a set of classes Domains are represented as packages in UML A Domain Chart captures the dependencies between domains

What is a Domain? A domain is an autonomous, real, hypothetical or abstract world inhabited by a set of conceptual entities that behave according to characteristic rules and policies Mellor and Balcer, p30 Real Worlds Air traffic control, patient administration, banking, … Hypothetical Worlds 3D geometry, statistical analysis, … Abstract Worlds User interface, messaging, workflow, …

Example Domain Chart Fuel Sales Shopping Forecourt Hardware Interfacing User Interface Logging Checkout Telecommunications Interface

Advantages of Subject Matter Partitioning Reuse Well-defined interfaces Effective use of subject-matter knowledge Stability to changing requirements Stability to changing technology Incorporation of third party software Effective integration with Use-Case driven development

Use Case Description Use Case Name Purpose Preconditions Invariants Primary Scenario Postconditions Make Fuel Delivery To allow a paying customer to deliver fuel of a selected grade The desired fuel grade is available Tank level >4% tank capacity while pump is on Customer removes nozzle from holster; Attendant enables pump; Customer selects one fuel grade; Pump motor is started; Customer uses trigger to control fuel delivery; Customer replaces nozzle in holster; Pump motor is stopped. At least 2 litres of fuel have been delivered

Domain Level Sequence Diagram Forecourt Hardware Interfacing User Interface Fuel Sales Checkout <Boundary> 1: binaryInputChanges 1: Customer removes nozzle 2: 3:Request pump enable 4: Alert attendant of Customer 5: Attendant enables pump 6: 7: Create Transaction Item 8: 9: Pump motor enabled 10: Customer presses trigger 11: 12: Start pumping fuel 13: loop until trigger released 14: Unit of fuel is delivered 15: … 2: nozzleRemoved 3:requestPumpEnable 4:alertAttendantToRequestForPumpEnable 5:pumpEnableButtonPressed 6:pumpEnabled 7:GO creation 8:enablePump 9:setBinaryOutput 10:binaryInputChanges 11:triggerDepressed 12:startPumping 13:impellorPulse 14:fuelUnitDelivered

Domain Class Diagram - Fuel Sales PumpSpecification FillingStation Pump FuelGrade Nozzle Tank

Domain Class Diagram - Fuel Sales PumpSpecification FillingStation isSpecifiedBy 1 specifies 0..* 1 isDispensingFuelFor 1..* dispensesFuelAt R4 R10 R6 R5 R1 R2 Pump FuelGrade isInUseAt 0..1 hasInUse 0..1 1 isLocatedAt 1..* isLocationFor 1 currentlyStores 0..* isCurrentlyStoredIn Nozzle suppliesFuelTo 0..* 1 acquiresFuelFrom Tank

Domain Class Diagram - Fuel Sales PumpSpecification FillingStation isSpecifiedBy 1 specifies 0..* 1 isDispensingFuelFor 1..* dispensesFuelAt R4 R10 R6 R5 R1 R2 Pump FuelGrade isInUseAt 0..1 hasInUse 0..1 1 isLocatedAt 1..* isLocationFor 1 currentlyStores 0..* isCurrentlyStoredIn Nozzle suppliesFuelTo 0..* 1 acquiresFuelFrom Tank Delivery 1 wasMadeFrom 0..* wasUsedToMake

Active vs Passive Classes Active Classes The behaviour of instances of active classes (“active objects”) varies over time e.g. Instances of a Thread class can be started, paused, continued, stopped This behaviour can be captured in a Statechart Passive Classes Passive objects have the same behaviour at all times Operations on a class are sufficient to define its behaviour Information classes, e.g. Address, are typically of this kind

Operations are used to model state-independent behaviour Modelling Operations Operations are used to model state-independent behaviour An operation is the invocation of some action via a parameterised interface think of a method call in Java or a function call in C Operations are executed synchronously the caller waits until the action has been executed and a result returned before continuing The resulting action may in turn invoke (synchronously) other actions, or asynchronous behaviour by generating signals

UML Statecharts Closed Down Idle Entry / display Welcome startup closedown Processing Customer Input card inserted / get pin validation received [invalid card] / confiscate Terminating Transaction withdrawal selected [valid card] / display wait

Good Practice for Statecharts Express the behaviour of Active Classes using a Statechart for each active class Restrict usage to a subset of the full Statechart notation for clarity: Actions are specified on entry into a state (not on exit, or on the transition itself) An individual event can only cause a single transition out of a given state This usage corresponds to expressing behaviour as a “Moore” machine

Statechart for Delivery Class

Statechart for Delivery Class

Statechart for Delivery Class Action Language specifies the detailed action that is performed here in terms of the concepts in the associated domain model

Interactions within Domains Operations can be invoked on objects or classes within a Domain. Signals can be sent to (active) objects or classes within a domain. Object-level sequence diagrams Collaboration diagrams

Interactions with other domains Domain-level sequence diagrams Operations can be invoked on other domains Signals can be sent to other domains

Next Actions Final Lab Class Tomorrow Example Exam papers will put up on the Website tomorrow If you have any further questions, please e-mail me or come along to office hours 2-4.00pm on Mondays