High-Level Design With Sequence Diagrams COMP314 (based on original slides by Mark Hall)

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

Chapter 11 Component-Level Design
UML (Sequence Diagrams, Collaboration and State Chart Diagrams) Presentation By - SANDEEP REDDY CHEEDEPUDI (Student No: ) - VISHNU CHANDRADAS (Student.
Systems Analysis and Design 8th Edition
Object-Oriented Analysis and Design
Object-Oriented Analysis and Design
Conversation Form l One path through a use case that emphasizes interactions between an actor and the system l Can show optional and repeated actions l.
Software Engineering COMP 201
Summary Class responsibility cards can be used to help allocate responsibilities between different classes. The use of stereotype classes, such as entity,
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
Essentials of class models. 2 A very simple class model In UML, a class is shown in a class diagram as a rectangle giving its name.
Lecture 4 Class Responsibility Collaboration Cards
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
© Copyright Eliyahu Brutman Programming Techniques Course.
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 Introduction.
Object-Orientated Design Unit 3: Objects and Classes Jin Sa.
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
Use Case Modeling.
Object-oriented design Part 4: More UML. Interfaces An interface is a language construct specific to Java Java does not support multiple inheritance Interfaces.
Unified Modeling Language
Business Modeling Domain Modeling Source: Use Case Driven Object Modeling with UML – A Practical Approach By Doug Rosenberg ISBN:
Object-Oriented Analysis and Design
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
1 CIS224 Software Projects: Software Engineering and Research Methods Lecture 5a CRC Cards & Sequence Diagrams (Based on Stevens and Pooley (2006, Section.
The Design Discipline.
Systems Analysis and Design in a Changing World, Fifth Edition
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
Introduction to Sequence Diagrams
Detailed design – class design Domain Modeling SE-2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
1 On to Object Design Chapter 14 Applying UML and Patterns.
More on “The Huddersfield Method” A lightweight, pattern-driven method based on SSM, Domain Driven Design and Naked Objects.
Object-Oriented Analysis and Design An Introduction.
Other UML Diagramming Techniques CS 124. UML Diagramming Techniques Class Diagrams Use Case Diagrams Interaction Diagrams Sequence diagrams Collaboration.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Systems Analysis and Design in a Changing World, 3rd Edition
Systems Analysis & Design 7 th Edition Chapter 5.
Developed by Reneta Barneva, SUNY Fredonia for CSIT 425 Requirements Modeling.
Systems Analysis and Design 8 th Edition Chapter 6 Object Modeling.
Chapter 12: Design Phase n 12.1 Design and Abstraction n 12.2 Action-Oriented Design n 12.3 Data Flow Analysis n Data Flow Analysis Example n
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
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.
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.
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
ITEC324 Principle of CS III Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
UML (Unified Modeling Language)
Analysis Classes. What Is an Analysis Class?  A class that represents initial data and behavior requirements, and whose software and hardware-oriented.
From Use Cases to Implementation 1. Structural and Behavioral Aspects of Collaborations  Two aspects of Collaborations Structural – specifies the static.
Appendix Object-Oriented Analysis and Design: Use Cases and Sequence Diagrams Modern Systems Analysis and Design Fifth Edition Jeffrey A. Hoffer Joey F.
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 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
From Use Cases to Implementation 1. Mapping Requirements Directly to Design and Code  For many, if not most, of our requirements it is relatively easy.
1 M206 Chapter 31: An Overview of Software Development 1.Defining the problem 2.Analyzing the requirement – constructing initial structural model 3.Analyzing.
Analysis Classes Unit 5.
Unified Modeling Language Tutorial
Chapter 1 OBJECT-ORIENTED ANALYSIS AND DESIGN
Unified Modeling Language
The Object Oriented Approach to Design
Component-Level Design
Unified Modeling Language
Week 12: Activity & Sequence Diagrams
CIS 375 Bruce R. Maxim UM-Dearborn
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
Other UML Diagramming Techniques
Software Design Lecture : 15.
CIS 375 Bruce R. Maxim UM-Dearborn
From Use Cases to Implementation
Presentation transcript:

High-Level Design With Sequence Diagrams COMP314 (based on original slides by Mark Hall)

2007COMP314 Software Engineering Modeling So Far… Domain modeling (preliminary design) –Behavioural requirements through use cases –Most problem space (conceptual) objects discovered –Static relationships on high-level class diagram Some class attributes identified –Maybe: some dynamic relationships (behaviour) described in functional requirements text

2007COMP314 Software Engineering Interaction Modeling: Moving Towards a Solution… Primary goal: –Allocate behaviour among objects from class diagram –Need to decide which objects are responsible for which bits of behaviour

2007COMP314 Software Engineering Interaction Modeling… Goals of interaction modeling continued: –Show the detailed interactions that occur over time among the objects associated with each use case Objects interact by sending “messages to each other”/calling methods on each other Identify the necessary messages/operations/methods for each unit of behaviour within a use case –Finalize distribution of operations among classes Find appropriate homes for attributes and operations Update static model

2007COMP314 Software Engineering Sequence Diagrams… Represent the major work product of an OO design One sequence diagram for each use case –Basic course + all alternative courses Forms the core of the dynamic model and defines: –Behaviour of the system at run time (ie what the system does) –A high-level view of how the system accomplishes behaviour

2007COMP314 Software Engineering Sequence Diagrams… Four types of elements: –The text for the course of action of the use case appears down the left hand side –Objects along the top Name of object and/or class appears in a box The object’s lifeline (a dotted line) extends from each box down the page –Messages/method calls are arrows between objects –Methods (operations) are rectangles that lie on top of the lifelines Length of rectangle indicates duration of activation

2007COMP314 Software Engineering Sequence Diagram Elements :SearchPage:SearchResultsPageCatalogue searchByAuthor() validateSearchCriteria() displayResults() method method call lifeline

2007COMP314 Software Engineering Sequence Diagrams aMailBox newMessages :MessageQueue add locat Box :MailSystem :MailBox >

2007COMP314 Software Engineering Allocating Behavior (Putting Methods on Classes)… Difficult compared to previous modeling tasks Factoring out commonality from use cases saves effort when drawing sequence diagrams

2007COMP314 Software Engineering Allocating Behavior… Two questions –What are the objects? –Which objects are responsible for which functions Responsibility driven design –A class should have a single “personality”, ie. A strongly related set of behaviours –Think cohesion –Avoid “schizophrenic” classes

2007COMP314 Software Engineering Class Responsibility Collaboration Cards… CRC cards can help you to think in terms of responsibilities Especially helpful for people new to OOA/OOD Not part of the UML Provides a brief, high-level overview of a class On a standard index card for each class, record: –The name of the class, at the top; –The responsibilities of the class, along the left-hand side; –The collaborators of the class, which help to carry out each responsibility, on the right-hand side of the card

2007COMP314 Software Engineering CRC… Responsibility –High level description of the purpose of the class –Avoid description of bits of data and process –Capture the purpose in (at most) a few sentences Collaborators –With each responsibility, indicate which other classes are needed to fulfil it

CRC… Advantages –Encourage discussion among developers –Promotes thinking about (and understanding) the high-level behaviour of classes Copy Maintain data about copies currently borrowed Meet requests to borrow and return copies CollaboratorsResponsibilities LibraryMember Book Maintain data about a particular copy of a book Inform corresponding Book when borrowed or returned CollaboratorsResponsibilities Copy

2007COMP314 Software Engineering Drawing Sequence Diagrams… Copy the text for the use case under consideration onto the left margin of the page –Serves as a reminder of what is to be accomplished –At this point we should have: Validated the use case text with stakeholders/users Refined the use case text to explicitly reference objects from the domain model Reviewed the requirements and preliminary design –Use white space around text to help it line up with associated messages

2007COMP314 Software Engineering Adding Infrastructure… Add methods and attributes to classes as soon as you decide where they go in the context of your sequence diagrams –Keep in mind coupling and cohesion Add “helper” classes and other infrastructure (eg. LibraryMemberControl) to system-level class diagrams –Shifts focus from problem space to solution space –Static model evolves from initial domain model to the final “software blueprint” from which code is written

2007COMP314 Software Engineering Adding Infrastructure Evolution of what the software does to how it does it Through sequence modeling we have –Linked what the software does from the user perspective with what the software does from the system perspective –Specified how the software does it at a high level by assigning behavior to classes and showing method calls over time

2007COMP314 Software Engineering Adding Infrastructure As design evolves more detail is added and implementation becomes more straightforward –Still need to specify how each object’s state changes in response to messages it receives –Still need to specify in detail the control and decision logic for each method in each class. Eg. Structured english/pseudocode, decision tables, decision trees - see Pressman ch. 14, Sommerville ch. 12.