© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 1 Modelling OO Logic Requirements: Sequence Diagrams and Activity Diagrams (Textbook Chapter 8, Appendix)

Slides:



Advertisements
Similar presentations
Object-Oriented Analysis and Design: Activity Diagrams
Advertisements

© 2005 by Prentice Hall Appendix 3 Object-Oriented Analysis and Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
Information System Design IT60105
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.
7M701 1 Activity Diagram. 7M701 2 Example 7M701 3 Activity Diagram: what is it? Describes activities and flows of data or decisions between activities.
Interaction Diagrams Activity Diagram State Machine Diagram
Software Engineering COMP 201
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
Sequence Diagram. What is Sequence Diagram?  Sequence Diagram is a dynamic model of a use case, showing the interaction among classes during a specified.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
Requirements Analysis Activity Diagrams b511.ppt © Copyright De Montfort University 2000 All Rights Reserved INFO2005 Requirements Analysis.
Modern Systems Analysis and Design Fifth Edition Jeffrey A
Object-Oriented Analysis and Design: Sequence Diagrams
COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Introduction to Requirements Analysis Lecture.
SE-565 Software System Requirements More UML Diagrams.
Tutorial 6 DFDs vs. Use Case Diagrams (Textbook Chapter 7 & Appendix)
CS3773 Software Engineering
Class, Sequence and UML Model.  Has actors and use cases.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
© 2008 Prentice Hall, Ovidiu Noran Lecture 7a 1 Modelling Logic Requirements (Textbook Chapter 8)
State diagrams Interaction diagrams –Sequence diagrams –Collaboration diagrams Object orientation Part 4: Dynamic Modeling.
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.
Chapter 5 – System Modeling
Activity/Workflow Diagrams Chapter 7 Appendix B. © 2011 Pearson Education, Inc. Publishing as Prentice Hall Process Modeling: Activity/Workflow Diagrams.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Interaction Models (2): Sequence Diagrams Extracted from textbook: Object Oriented Modeling and Design with UML M. Blaha, J. Rumbaugh 1.
Activity diagrams. Introduction ● Activity diagrams are a behavioural model that represent the dynamics of the system. ● An activity diagram is essentially.
9-1 © Prentice Hall, 2004 Chapter 9: Analysis Classes Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey.
9-1 © Prentice Hall, 2007 Chapter 9: Analysis Classes Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Sequence Diagrams CSIS3600. Sequence Diagrams A sequence diagram shows an interaction arranged in time sequence. In particular, it shows the objects participating.
Chapter 7 Appendix C Object-Oriented Analysis and Design: Sequence Diagrams Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F.
UNIFIED MODELING LANGUAGE(UML) BY Touseef Tahir Lecturer CS COMSATS Institute of Information Technology, Lahore.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
Chapter 11 Activity Diagrams. 2 “Activity diagrams are a technique to describe procedural logic, business processes, and work flows” - M. Fowler An activity.
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
Chapter 7 Appendix B Object-Oriented Analysis and Design: Activity Diagrams Modern Systems Analysis and Design Seventh Edition Jeffrey A. Hoffer Joey F.
A Student Guide to Object-Oriented Development
(14-2) UML Instructor - Andrew O’Fallon CptS 122 (December 2, 2015) Washington State University.
Dynamic Models Sequence Diagrams Collaboration Diagrams Activity Diagrams.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 26. Review UML behavioral Diagrams – Sequence diagram.
7-1 © Prentice Hall, 2007 Topic 7: Analysis Classes Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey.
Analysis Classes. What Is an Analysis Class?  A class that represents initial data and behavior requirements, and whose software and hardware-oriented.
Activity Diagramming by Andrzej Rosolski Stanisław Gliniewicz.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
Appendix Object-Oriented Analysis and Design: Use Cases and Sequence Diagrams Modern Systems Analysis and Design Fifth Edition Jeffrey A. Hoffer Joey F.
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
Systems Analysis and Design in a Changing World, Fourth Edition
Appendix 3 Object-Oriented Analysis and Design
Analysis Classes Unit 5.
Visit for more Learning Resources
Object-Oriented Analysis and Design: Sequence Diagrams
Activity Diagrams Activity diagrams describe the workflow behavior of a system.  The diagrams describe the state of activities by showing the sequence.
Business System Development
Software Engineering Chapter 5 (Part 3) System Modeling Dr.Doaa Sami.
Process Modeling: Activity/Swimlane Diagrams
Week 12: Activity & Sequence Diagrams
Chapter 20 Object-Oriented Analysis and Design
Object-Oriented Analysis and Design: Activity Diagrams
Appendix A Object-Oriented Analysis and Design
Chapter 9: Sequence Diagrams Chapter 5 in Software Engineering Book
Appendix A Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
Appendix 3 Object-Oriented Analysis and Design
Object-Oriented Analysis and Design: Activity Diagrams
Presentation transcript:

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 1 Modelling OO Logic Requirements: Sequence Diagrams and Activity Diagrams (Textbook Chapter 8, Appendix)

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 2 Learning Objectives Understand how to detail use cases and represent some system logic with sequence diagrams. Understand how to represent processes and system logic with activity diagrams. Understand the relationship between different types of diagrams

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 3 Interaction and Activity Diagrams Use Case diagrams are too simple to show details of the interactions among objects within a use case. In addition to written use cases, Interaction Diagrams (Sequence and Collaboration) are used to detail the interactions taking place in a use case Activity Diagrams are used to show the conditional logic for the sequence of system activities needed to accomplish a business process.

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 4 Dynamic Modelling: Sequence Diagrams Sequence diagram: depicts the interactions among objects during a certain period of time. May be presented either in a generic form or in an instance form. Generic form shows all possible sequences of interactions, corresponding to all the scenarios of a use case. Instance form shows the sequence for only one scenario (a specific combination of conditions within a use case (Fowler, 2000))

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 5 Elements of a sequence diagram  Objects: represented by boxes at top of diagram.  Lifeline: the time during which an object exists.  Messages: means by which objects communicate with each other. Objects (derived out of classes) and messages are essential elements of the OO approach. More in future lectures… Sequence Diagrams (Cont.)

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 6 Activation: the time period during which an object performs an operation. Synchronous message: a type of message in which the caller has to wait for the receiving object to finish executing the called operation before it can resume execution itself. Sequence Diagrams (Cont.)

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 7 Simple message: a message that transfer control from the sender to the recipient without describing the details of the communication. Asynchronous message: a message in which the sender does not have to wait for the recipient to handle the message. Sequence Diagrams (Cont.)

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 8 Scenario modelled: Class registration. Assumptions: course has no prerequisites 1. Registration Clerk opens the registration window and enters the registration information 2. Check if the class is open 3. If the class is open, check if the course has any prerequisites. 4. Assumed course has no prerequisites. Register the student for the class; increment the class size by one. 5. Check if the class ifs full; if not, do nothing 6. Display the confirmed registration in the registration window Sequence Diagrams (Cont.)

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 9 Sequence diagram for a class registration scenario without prerequisites ObjectName: ClassName ‘Non-persistent’ (control) object Lifeline No response shown. (assumption: class open) Guard conditions ‘Self delegation’ (call upon one’s own operation(s) (Object destroys itself) Activation (performs operation) Synchronous message (all shown are synchronous) Anonymous Object Named Object (‘a New Registration’)

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 10 Scenario modelled: Class registration. Assumptions: course has prerequisites, class not full 1. Registration Clerk opens the registration window and enters the registration information 2. Check if the class is open 3. If the class is open, check if the course has any prerequisites. Assumed course has prerequisites. 4. If the student has taken the prerequisites, then register the student for the class and increment the class size by one. 5. Check if the class ifs full; assumed class not full. 6. Display the confirmed registration in the registration window Sequence Diagrams (Cont.)

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 11 Sequence diagram for a class registration scenario with prerequisites Guard condition for existing prerequisites In this scenario, assume class not full Time

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 12 A sequence diagram for “Prerequisite Courses Not Completed” use case Student has not taken prerequisites Scenario:

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 13 Process Modelling: Activity Diagrams Elements of Activity Diagrams:  Activity: a behavior that an object carries out while in a particular state.  Transition: a movement from one activity or state to another.  Branch: a diamond symbol containing a condition whose results provide transitions to different paths of activities.

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 14 Activity Diagram for a Customer Order Process Time

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 15 Process Modelling: Activity Diagrams (Cont.)  Synchronization bar: horizontal or vertical bars denoting parallel or concurrent paths of activities. Fork: the beginning of parallel activities. Join: the end of parallel activities.  Swimlanes: columns representing different organisational units of the system.

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 16 Process Modelling: Activity Diags (Cont.)

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 17 Process Modelling: Activity Diags (Cont.)

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 18 Hospital Pharmacy Level-0 DFD 2.0 Review Prescription Order by Station 3.0 Fill Order 4.0 Generate Label Nurses Station Doctor Billing Dept D1 Patient File Prescription Unfilled Order Info Unfilled Order Info Response Order Info Patient Number and Drug Type, Amount & Cost Pharmacy Tech Review Prescription Prescription Order Fill Info 1.0 Review & Send Prescription to Station Drug Label Info Patient Info Comparing Activity Diagrams with DFDs Processes are shown in both diagrams. HOWEVER… -No time dimension, hence no synchronisation, etc features -No explicit decision logic (remember how it can be suggested in DFDs ??

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 19 Relationship of OO techniques / diagrams Source: (Satzinger et. al, 2008)

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 20 Summary In this appendix you had the opportunity to learn how to: Understand how to detail use cases and represent some system logic with sequence diagrams. Understand how to represent system logic with activity diagrams. Understand the relationship between different types of diagrams

© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 21 References  Fowler, M UML Distilled: A Brief Guide to the Object Modelling Language. 2 nd Ed. Reading, MA: Addison Wesley  Satzinger, G., Jackson, R.Burd, S Systems Analysis and Design in a Changing World. 5 th Ed. Course Technology