1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.

Slides:



Advertisements
Similar presentations
State Charts Mehran Najafi. Reactive Systems A reactive, event-driven, object is one whose behavior is best characterized by its response to events dispatched.
Advertisements

Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Use Case & Use Case Diagram
Karolina Muszyńska Based on:
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.
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
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
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:
Software engineering Methods Software Engineering Methods State Diagrams Zvi Avidor Written By With additions by Zvika Gutterman and Adam Carmi.
THE OBJECT-ORIENTED DESIGN WORKFLOW Statechart Diagrams.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
Advanced Behavioral Modeling
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.
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
UML Diagrams: Sequence Diagrams The Requirements Model, and The Dynamic Analysis Model Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty.
Quiz 1. Who is the guru of Extreme Programming?
Chapter 10 State Machine Diagrams
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 06. Requirements.
Requirements Artifacts Precursor to A & D. Objectives: Requirements Overview  Understand the basic Requirements concepts and how they affect Analysis.
Object-Oriented Modeling Using UML CS 3331 Section 2.3 of Jia 2003.
Behavioral Modeling Chapter 8.
1 Object-Oriented Modeling Using UML CS 3331 Section 2.4 Modeling Requirements with Use Cases.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Engineering Lab Use Cases Faculty of Information system Technology.
1 Structuring Systems Requirements Use Case Description and Diagrams.
Shanghai Jiao Tong University 上海交通大学软件工程中心 Object Oriented Analysis and Design Requirements Overview.
The Unified Modeling Language Part II Omar Meqdadi SE 2730 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Use Cases Use Cases are employed to describe the functionality or behavior of a system. Each use case describes a different capability that the system.
Use Case Diagram The purpose is to communicate the system’s functionality and behaviour to the customer or end user. Mainly used for capturing user requirements.
SWT - Diagrammatics Lecture 4/4 - Diagramming in OO Software Development - partB 4-May-2000.
1 Kyung Hee University Statecharts Spring Kyung Hee University Specifying Objects’ Behaviour  Interaction diagrams show message-passing behaviour.
Dynamic Models. Outline Dynamic Models Statecharts –States –Transitions –Composite states Interaction Diagrams –Sequence Diagrams The time order of interactions.
Systems Analysis and Design in a Changing World, Fourth Edition
States.
Dynamic Modeling Grady Booch, James Rumbaugh, and Ivar Jacobson, The Unified Modeling Language User Guide, 2 nd edition, Addison Wesley, 2005.
Essentials of Visual Modeling w/ UML Instructor Notes
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.
Chapter 3: Introducing the UML
UML - Development Process 1 Software Development Process Using UML.
Modeling Object Lifecycles and State-Dependent Behavior ©SoftMoore ConsultingSlide 1.
Use Case Diagram Lecture # 1. Use Case Diagram Use-cases are descriptions of the functionality of a system from a user perspective.  Depict the behaviour.
Chapter 6: Structuring Requirements: Use Case Description and Diagrams Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
McGraw-Hill/Irwin© 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 17 Object-Oriented Design and Modeling Using the UML.
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.
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
Systems Analysis and Design in a Changing World, Fourth Edition
Using Use Case Diagrams
State Machine Model.
Dynamic Modeling of Banking System Case Study - I
UML Use Case Diagrams.
State Machine Diagrams
UML State Diagrams.
States.
Object Oriented System Design
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A. Hoffer
Object Oriented Analysis and Design
UML Diagrams: Sequence Diagrams Dynamic Analysis Model
BPMN - Business Process Modeling Notations
Using Use Case Diagrams
States.
UML State Diagrams.
Modeling Behavior in Statechart Diagrams
Test Design Techniques Software Testing: IN3240 / IN4240
Presentation transcript:

1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009

2 Outline  Modeling dynamic behavior Statechart diagram Sequence diagram  Modeling requirements Use case diagram

3 Modeling Dynamic Behavior  Statechart diagram Depicts the flow of control using states and transitions Generalization of finite state machines  Sequence diagram Depicts object interaction by highlighting the time ordering of method invocations

4 Statechart Diagram  Graph representing finite state machine  Network of states and transitions  Good for modeling reactive systems OnOff push switch

5 Elements of Statechart Idle Initial State Running Final State State Transition

6 State  Condition or situation in the life of a system (or object) during which it: Satisfies some condition, Performs some activity, or Waits for some events.  Set of values of properties that affect the behavior of the system (or object). Determines response to an event, Thus, different states may produce different responses to the same event

7 Transition  Relationship between two states indicating that a system (or object) in the first state will: Perform certain actions and Enter the second state when specified event occurs and specified condition is satisfied.  Consists of: Source and target states Optional event, guard condition, and action Source Event [Condition] / Action Target

8 Definition  Event An occurrence of a stimulus that can trigger a state transition Instantaneous and no duration  Action An executable atomic computation that results in a change in state of the model or the return of a value

9 Example dial digit(n) [incomplete] Dialing Connecting busy connected dial digit(n) [valid] / connect dial digit(n) [invalid] Invalid Ringing Busy

10 Another Example anomaly Normal Recovery Identification Pressure Recovery Temperature Recovery recovery success recovery success temperature pressure recovery failure recovery failure recovery failure

11 Composite States anomaly Normal Recovery Identification Pressure Recovery Temperature Recovery recovery success temperature pressure Recovery recovery failure

12 Composite States (Cont.)  Used to simplify diagrams  Inside, looks like statechart  May have composite transitions  May have transitions from substates  Sequential and parallel

13 Composites and Transitions Idle Maintenance Printing Selecting Processing Validating Transition from substate Transition to/from composite state Active

14 Including Composite States Start entry / start dial tone exit / end dial tone Partial Dialing entry / number.append(n) digit(n) [number.isValid()] Dialing Dial Number Include / Dialing

15 Parallel Composition  Concurrency (split of control)  Synchronization substate1substate2 Superstate substate3substate4

16 Example HW1HW2 Incomplete Project MidtermFinal Passed Failed fail

17 Group Exercise: Cellular Phone  Draw a statechart describing the operation of a cellular phone. Assume that the cellular phone has keys for: power on and off keypad locking and unlocking 0-9, #, and * talk (or send) and end Model at least the following operations: power on/off keypad locking/unlocking making calls (e.g., dialing, connecting, talking), receiving calls (e.g., ringing, talking)

18 Outline  Modeling dynamic behavior Statechart diagram Sequence diagram  Modeling requirements Use case diagram

19 Sequence Diagram  Describes a sequence of method calls among objects  Highlights the time ordering of method calls

20 Example message lifetime control object

21 Example (Cont.) Sequence of message sending

22 Collaboration Diagram object link message

23 Collaboration Diagram Collaboration

24 Outline  Modeling dynamic behavior Statechart diagram Sequence diagram  Modeling requirements Use case diagram

25 Modeling Requirements  Use case diagram Describes the externally observable behavior of system functions, usually to define system requirements Describes interactions between the system and external entities

26 Example: Goldmine Check Grades Register actor system boundary use case Validate User > Student

27 Elements of Use Case Diagram  Actor: represents a role played by external entities that interact with the system  Use case: Describes what the system does (i.e., functionality) Scenario: sequence of interactions between the actors and the system  Relationship: Extension (or generalization) among actors Association between actors and use cases Dependency among use cases: include and extend

28 Example: Goldmine (Cont.) > UserStudentFaculty Enter GradesValidate UserCheck GradesGet RosterRegister > User StudentFaculty

29 Use Case Scenarios Use Case: Check Grades Description: View the grades of a specific year and semester Actors: Student Precondition: The student is already registered Main scenario: User System 3. The user enters the year and semester, e.g., Fall The system carries out “Validate User”, e.g., for user “miner” with password “allAs”. 2. The system prompts for the year and semester. 4. The system displays the grades of the courses taken in the given semester, i.e., Fall Alternative: The student enters “All” for the year and semester, and the system displays grades of all courses taken so far. Exceptional: The “Validate User” use case fails; the system repeats the validation use case.

30 Group Exercise: E-book Store Identify the main actors and the key use cases for an e-bookstore, and draw a use case diagram. Describe the use case scenario for the most important use case. The core requirements of the e-bookstore are to allow its customers to browse and order books, music CDs, and computer software through the Internet. The main functionalities of the system are to provide information about the titles it carries to help customers make purchasing decisions; handle customer registration, order processing, and shipping; and support management of the system, such as adding, deleting, and updating titles and customer information.