Executable UML The Models are the Code - Executable UML Lecture 2 - Using Executable UML Paul Krause.

Slides:



Advertisements
Similar presentations
Withdrawal Transaction Use Case Primary Actor: Customer Pre-conditions: The customer must have a valid ATM card and PIN. Post-conditions: The customer.
Advertisements

Use Case Diagrams Damian Gordon.
© 2010 Bennett, McRobb and Farmer1 Use Case Description Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
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.
Extending the Requirements Model - techniques for detailing use cases
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
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der.
January Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box.
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
Chapter 10 System Sequence Diagrams. What is a System Sequence Diagram? A way of modeling input and output events related to systems It is a picture that.
Lecture 4 Class Responsibility Collaboration Cards
Modeling State-Dependent Objects Using Colored Petri Nets
THE OBJECT-ORIENTED DESIGN WORKFLOW Statechart Diagrams.
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.
Use Case Modeling. Use case diagram For each use case we develop  Object class diagram (with attributes only)  System sequence diagram (analysis) 
The Models are the Code - Executable UML
Executable UML The Models are the Code - Executable UML CS387 Paul Krause.
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 9 - Communication and Relationship Dynamics Paul Krause.
Internet Software Development Putting it all together Paul J Krause.
Object Oriented Analysis and Design System Events & Contracts.
Executable UML The Models are the Code - Executable UML Lecture 3 - Modelling with Domains and Classes Paul Krause.
Systems Analysis and Design in a Changing World, 6th Edition
Chapter 14 System Testing.
Dynamic Modeling Chapter 11 Part of Analysis Modeling Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
USE CASE Bayu Adhi Tama, MTI Faculty of Computer Science, University of Sriwijaya Slides are adapted from Petrus Mursanto
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.
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
UML-1 8. Capturing Requirements and Use Case Model.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Validating Requirements Determining Completeness and Correctness of Requirements Using the System Reference Model IV&V Workshop 16 September 2009.
Business Analysis with For PG MDI, Gurgaon Kamna Malik, Ph.D.
1 Kyung Hee University Statecharts Spring Kyung Hee University Specifying Objects’ Behaviour  Interaction diagrams show message-passing behaviour.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 5 INTRODUCTION TO SYSTEMS ANALYSIS AND DESIGN: AN AGILE, ITERATIVE APPROACH CHAPTER.
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.
Scenario A scenario is a sequence of steps describing an interaction between a user and a system. Use case is a set of scenarios tied together by a common.
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” Used to capture and describe.
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.
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 After the scenarios are formulated Find all the use cases in the scenario Describe each of these use cases in more detail Participating actors Describe.
Requirements Document for the Banking System
1 Object Oriented Analysis and Design System Events & Contracts.
1 Case Study and Use Cases for Case Study Lecture # 28.
Paul Ammann & Jeff Offutt
Use Case Driven Analysis
Dynamic Modeling of Banking System Case Study - I
Object-Oriented Static Modeling of the Banking System - I
Dynamic Modeling of Banking System Case Study - II
Use Case Modeling - techniques for detailing use cases
Paul Ammann & Jeff Offutt
Chapter 10 Object States and The Statechart Diagram
Presentation transcript:

Executable UML The Models are the Code - Executable UML Lecture 2 - Using Executable UML Paul Krause

Executable UML Lecture 2 - Using Executable UML v Domain Charts and Use Cases v Class Diagrams v State models

Executable UML What is a Domain? Pet name weight Cat standoffIndex Dog slobberFactor Owner Human Van Vehicle Veterinary Medicine

Executable UML Example Domain Chart Fuel SalesShopping Forecourt Hardware Interfacing Checkout User InterfaceLogging Telecommunications Interface

Executable UML 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 1.Customer removes nozzle from holster; 2.Attendant enables pump; 3.Customer selects one fuel grade; 4.Pump motor is started; 5.Customer uses trigger to control fuel delivery; 6.Customer replaces nozzle in holster; 7.Pump motor is stopped. At least 2 litres of fuel have been delivered

Executable UML Domain Level Sequence Diagram Forecourt Hardware InterfacingUser InterfaceFuel Sales Checkout 1: binaryInputChanges 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 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: …

Executable UML Domain Class Diagram - Fuel Sales PumpPumpSpecificationFillingStation Nozzle TankFuelGrade

Executable UML Domain Class Diagram - Fuel Sales PumpPumpSpecificationFillingStationNozzleTankFuelGrade 1 isDispensingFuelFor 1..* dispensesFuelAt isSpecifiedBy 1 specifies 0..* isInUseAt 0..1 hasInUse isLocatedAt 1..* isLocationFor suppliesFuelTo 0..* 1 acquiresFuelFrom 1 currentlyStores 0..* isCurrentlyStoredIn R4R10 R6R5 R1 R2

Executable UML Domain Class Diagram - Fuel Sales PumpPumpSpecificationFillingStationNozzleTankFuelGrade 1 isDispensingFuelFor 1..* dispensesFuelAt isSpecifiedBy 1 specifies 0..* isInUseAt 0..1 hasInUse isLocatedAt 1..* isLocationFor suppliesFuelTo 0..* 1 acquiresFuelFrom 1 currentlyStores 0..* isCurrentlyStoredIn R4R10 R6R5 R1 R2 Delivery 1 wasMadeFrom 0..* wasUsedToMake

Executable UML Active vs Passive Classes v 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 v 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

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

Executable UML Good Practice for Statecharts v Express the behaviour of Active Classes using a Statechart for each active class v 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 v This usage corresponds to expressing behaviour as a “Moore” machine

Executable UML Statechart for Delivery Class

Executable UML Statechart for Delivery Class

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

Executable UML Next Actions v You should:  Read Chapter 2 of Mellor and Balcer  Preferably also Chapter 2 of Raistrick et al v In future lectures we will need to:  Discuss more on how to build good class models  Introduce Action Languages  Cover more of the basics of Statecharts  Cover ways of building communicating Statecharts  Show how to verify models  Finally, show how to put all the models together and generate an executable