CSCI-383 Object-Oriented Programming & Design Lecture 12.

Slides:



Advertisements
Similar presentations
Object-Oriented Software Engineering Visual OO Analysis and Design
Advertisements

GRADUATION PROJECT-1 SEMINAR- 2: Phases and Project 1 Guide Academic Year: / Semester I.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
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.
2.4. Use Case Modeling In O-O based IT projects, we can begin the requirements analysis phase with a Use Case Analysis A use case is a common or representative.
Drawing System Sequence Diagrams
Systems Analysis and Design in a Changing World, Fourth Edition
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
7M822 UML Sequence Diagrams 2 December 2010.
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
Chapter 8: Modelling Interactions and Behaviour
NJIT Drawing System Sequence Diagrams Chapter 10 Applying UML and Patterns Craig Larman Presented by Anuradha Dharani.
Lab 6 CPIT 250 System Analysis and Design.
Modern Systems Analysis and Design Fifth Edition Jeffrey A
7M822 UML Interaction Diagrams 25 November 2010.
Modeling Dynamic Behavior: Sequence and Collaboration Diagrams.
Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.
SE-565 Software System Requirements More UML Diagrams.
Blaha and Rumbaugh Sections 7.2 and 8.2
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
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.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
Modelling Interactions and Behaviour. © Lethbridge/Laganière 2005 Chapter 8: Modelling Interactions and Behaviour2 Interaction Diagrams Interaction diagrams.
מידול התנהגותי 1. Today’s Session Sequence Diagrams State Machines 2.
1 CSC 450 Slides adapted from slides created by Robert B. France UML Behavioral Models.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
1 Modeling interactions and behavior Lecturer Dr. Mai Fadel.
Modelling interactions and behaviour Adapted after : Timothy Lethbridge and Robert Laganiere, Object-Oriented Software Engineering – Practical Software.
Behavioral Modeling Chapter 8.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence.
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.
Drawing System Sequence Diagrams
Modeling with UML The Unified Modeling Language (UML) is a standard graphical language for modeling an object-oriented software by providing a standard.
© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 1 Modelling OO Logic Requirements: Sequence Diagrams and Activity Diagrams (Textbook Chapter 8, Appendix)
Information System Design IT60105
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
Sequence Diagrams Sequence; Interaction Diagrams Behavioral Diagrams
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour UML Sequence Diagram.
COMP-350 Object-Oriented Analysis and Design Drawing System Sequence Diagrams Reference: Larman, Chapter 9.
UNIFIED MODELING LANGUAGE(UML) BY Touseef Tahir Lecturer CS COMSATS Institute of Information Technology, Lahore.
System Sequence Diagram Chandan Rupakheti & Steve Chenoweth Week 5-3a.
Systems Analysis and Design in a Changing World, Fourth Edition
Essentials of Visual Modeling w/ UML Instructor Notes
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour Based on Presentations.
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.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 6: Restaurant.
More on UML 1. 1.Use-case diagram 2.Class diagram [Object diagram] (static) 1.1 Domain/analysis model – of reality 1.2 Design model – of decisions 3.
Chapter 7 Behavioral Modeling Brandon A. Jones Stand and Deliver ITEC March 6, 2011.
Project 2: Phase 1 Submission 7 Late submissions 10% 10 No submissions 14% Better than project 1 phase 3 submissions 10-point bonus: If you catch the deadline.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
Systems Analysis and Design in a Changing World, Fourth Edition
Business System Development
UML dynamic Modeling (Behavior Diagram)
Sequence Diagrams.
Object Oriented Analysis and Design
Interaction diagrams.
CIS 375 Bruce R. Maxim UM-Dearborn
Unified Modelling Language
Chapter 9: Sequence Diagrams Chapter 5 in Software Engineering Book
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
CHAPTER 2 Object-Oriented Modeling Using UML (Continued)
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix 3 Object-Oriented Analysis and Design
Presentation transcript:

CSCI-383 Object-Oriented Programming & Design Lecture 12

UML Diagrams

Interaction Diagrams Interaction diagrams are used to model the dynamic aspects of a software system –They help you to visualize how the system runs –An interaction diagram is often built from a use case and a class diagram –The objective is to show how a set of objects accomplish the required interactions with an actor

Interactions and Messages Interaction diagrams show how a set of actors and objects communicate with each other to perform –The steps of a use case, or –The steps of some other piece of functionality The set of steps, taken together, is called an interaction Interaction diagrams can show several different types of communication –E.g. method calls, messages send over the network –These are all referred to as messages

Elements Found in Interaction Diagrams Instances of classes –Shown as boxes with the class and object identifier underlined Actors –Use the stick-person symbol as in use case diagrams Messages –Shown as arrows from actor to object, or from object to object

Creating Interaction Diagrams You should develop a class diagram and a use case model before starting to create an interaction diagram There are two kinds of interaction diagrams: –Sequence diagrams –Communication diagrams

Sequence Diagrams Class Diagram Sequence Diagram

Sequence Diagrams A sequence diagram shows the sequence of messages exchanged by the set of objects performing a certain task –The objects are arranged horizontally across the diagram –An actor that initiates the interaction is often shown on the left –The vertical dimension represents time –A vertical line, called a lifeline, is attached to each object or actor –The lifeline becomes a broad box, called an activation box during the live activation period –A message is represented as an arrow between activation boxes of the sender and receiver A message is labelled and can have an argument list and a return value

Sequence Diagrams Same example but with more details

Sequence Diagrams If an object’s life ends, this is shown with an X at the end of the lifeline

Exercise Suppose that we are developing a loan processing system and we have identified the following use case: Use case: Submit Loan Request Actors: Applicant, Credit Bureau Steps: 1. An applicant completes and submits a loan application to the bank via the Internet. 2. The system validates the information on the loan application, checking that it is correct and as complete as possible. 3. The system forwards a loan request to an external credit bureau for a credit report on the applicant. 4. The system calculates the applicant’s credit score based on the returned credit report. Draw a corresponding sequence diagram (DONE IN CLASS)

UML Diagrams

State Diagrams State diagrams are a technique to describe the behavior (i.e., state changes) of a single object according to events and messages which the object sends and receives How does an individual object interact with other objects? –Reacting to events and to messages received by the object –Triggering actions and sending messages to other objects

State Diagrams State diagrams are good at describing the behavior of an individual object across several use cases Draw state diagrams especially for classes that are not well understood and that need detailed description State diagrams are not very good at describing behavior that involves a number of objects collaborating together If you have to describe several objects, which are involved in a single use case, use interaction diagrams instead

States A state –Represents the internal condition/state of an object for a certain period of time –Corresponds to an interval of time between 2 events The response to events may depend on the state of an object Object creation comes together with an initial object state Object deletion may be related with (one or many) final states

Sample State Diagram

Events An event is something worth noticing at a point of time –A signal from one object to another (e.g., “delivered”) –A message received by an object (e.g., “check item”) –A certain date/time (e.g., “after 10 seconds” of being in a certain state or “at 31-dec-2000, 00:00”) Events may take arguments (e.g., “deliver to receiver: Customer”)

Transitions A transition represents a change of the internal condition/state of an object A transition is usually triggered (“fired”) by an event. Transitions without event label (“lambda transitions”) fire immediately Transitions fire instantly –From exactly one state to another state or to itself (self- transition) and are not interruptible

Transitions

Guards A guard is a logical condition (i.e., value is either “true” or “false”) A guarded transition fires only if the guard resolves to “true” Since only one transition can be fired in a given state, guards are intended to be mutually exclusive for any event Events may be guarded

Guards

Exercise Draw a state diagram that shows the behavior of instances of the CourseSection class in the following class diagram: (DONE IN CLASS)