Dr. Kivanc DincerCS319 Week 6 - Oct.17,20051 Chapter 14 Onto Object Design Objectives Understand dynamic and static object design modeling. Try agile modeling,

Slides:



Advertisements
Similar presentations
Chapter 15 UML Interaction Diagrams 1CS6359 Fall 2012 John Cole.
Advertisements

Object-Oriented Analysis and Design CHAPTERS 15: UML INTERACTION DIAGRAMS 1.
Interaction Diagram Notation From Chapter 15 of Craig Larman, Applying UML and Patterns John Dalesandro.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
Chapter 1 Object Oriented Analysis and Design. UML, Patterns, and Object-Oriented Analysis and Design  The essential skills for the creation of well-designed,
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.
Dr. Kivanc DincerCS319 Week 11 - Nov.21,20051 Chapter 20 Mapping Designs to Code Objectives Map design artifacts to code in an object-oriented language.
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
Chapter 15 Interaction Diagrams. Most Common Sequence Diagram Communication Diagram Sequence Diagrams illustrate interactions between classes of a program.
NJIT 1 On to Object Design Chapter 14 Applying UML and Patterns.
NJIT Drawing System Sequence Diagrams Chapter 10 Applying UML and Patterns Craig Larman Presented by Anuradha Dharani.
Designing with Interaction and Design Class Diagrams Chapters 15 & 16 Applying UML and Patterns Craig Larman With some ideas from students in George Blank’s.
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Object-Oriented Analysis and Design Feb 9, 2009.
CSSE 374: Interaction Diagrams Steve Chenoweth Office: Moench Room F220 Phone: (812) These slides and others derived.
Interactions. 2 Objects communicate with each other by sending messages. Sending a message is another name for a member function call. –Some C++ examples.
Software Engineering 1 Object-oriented Analysis and Design Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative.
Interaction diagrams Sequence and collaboration diagrams.
1 SAD2 - UML 2 nd Lecture Sequence Diagram and other dynamic views Lecturer: Dr Dimitrios Makris
High-Level Design With Sequence Diagrams COMP314 (based on original slides by Mark Hall)
Requirements To Design--Iteratively Chapter 12 Applying UML and Patterns Craig Larman.
On to Object Design 徐迎晓 复旦大学软件学院
1 On to Object Design Chapter 14 Applying UML and Patterns.
Object-Oriented Analysis and Design An Introduction.
11 Partnership for Performance How to hear this lecture Click on the icon: to hear the narration for each slide.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 9: Interaction.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML Sequence Diagrams.
Starting Object Design
Chapter 4: UML Interaction Diagrams. Objective Provide a reference for frequently used UML interaction diagram notation- sequence and communication diagrams.
Object-Oriented Analysis and Design Fall 2009.
GRASP: Designing Objects with Responsibilities
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Interaction and Communication Diagrams Patrick Bailey Keith Vander Linden Calvin College.
What to remember from Chap 13 (Logical architecture)
Drawing System Sequence Diagrams
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
Interaction Diagram Notation
Object-Oriented Analysis and Design Feb 11, 2009.
Object-Oriented Analysis and Design 1 Mira Balaban & Arnon Sturm Object-Oriented Analysis and Design Session 3a: Behavioral Modeling - Interactions.
1 On To Object Design Chapter 14 Applying UML and Patterns -Craig Larman.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Com S 362: Object-Oriented Analysis and Design From Design To Code.
TK2023 Object-Oriented Software Engineering CHAPTER 9 INTRODUCTION TO OBJECT DESIGN.
Chapter 3: Introducing the UML
Communication Diagrams Lecture 8. Introduction  Interaction Diagrams are used to model system dynamics  How do objects change state?  How do objects.
Object Oriented Analysis & Design By Rashid Mahmood.
Logical Architecture and UML Package Diagrams. The logical architecture is the large-scale organization of the software classes into packages, subsystems,
Introduction to UML.
UML(Unified Modeling Language)
UML Diagrams By Daniel Damaris Novarianto S..
UML Interaction Diagrams
Chapter 1 OBJECT-ORIENTED ANALYSIS AND DESIGN
DESIGN MODEL: USE-CASE REALIZATIONS WITH GRASP PATTERNS
UML Diagrams Jung Woo.
MCS morning (3rd semester) Department of CS&IT
UML dynamic Modeling (Behavior Diagram)
Princess Nourah bint Abdulrahman University
UML Sequence Diagrams.
Requirements To Design In This Iteration
Princess Nourah bint Abdulrahman University
System Sequence Diagrams
Week 12: Activity & Sequence Diagrams
Communication Diagrams
Interaction Diagrams A Lot of UML!
Review CSE116 2/21/2019 B.Ramamurthy.
Week 5.
Week 5.
On to Object Design c. 14.
Presentation transcript:

Dr. Kivanc DincerCS319 Week 6 - Oct.17,20051 Chapter 14 Onto Object Design Objectives Understand dynamic and static object design modeling. Try agile modeling, or a UML CASE tool for drawing. “I do not like this word ‘bomb’. It is not a bomb. It is a device that is exploiding.” - Ambassador Jackues le Blanc on nuclear weapons

Dr. Kivanc DincerCS319 Week 6 - Oct.17,20052 Agile Modeling and Lightweight UML Drawing Two of the aims of Agile modeling: –Reduce drawing overhead –Model to understand and communicate This is a change from a view of modeling as documentation. In a era of rapid change, documentation tends to have minimal value. More Agile Principles –Modeling with others –Create several models in parallel –Use temporary models such as diagrams on white boards –Digital photographs of white boards can be shared on a wiki. (See

Dr. Kivanc DincerCS319 Week 6 - Oct.17,20053 UML Case Tools You can also do agile modeling with UML case tools like Rational Rose, Together, or one that comes with a popular IDE such as Eclipse or Visual Studio. Choose a tool that can read your code and reverse engineer it to create diagrams from your code. Switch back and forth from diagramming to reverse engineering.

Dr. Kivanc DincerCS319 Week 6 - Oct.17,20054 How much time spent during UML before coding? Limit time spent drawing A few hours or at most one day of diagramming should do most of the work for a three week iteration. Occasional short sessions of modeling during the iteration can clarify any concepts that still need to be understood.

Dr. Kivanc DincerCS319 Week 6 - Oct.17,20055 Designing Objects: Static and Dynamic Modeling Dynamic models such as interaction diagrams (sequence or communication diagrams) help design logic, code behavior, and method bodies. Static Models such as class diagrams help define packages, class names, attributes, and method signatures. Switch back and forth during modeling sessions.

Dr. Kivanc DincerCS319 Week 6 - Oct.17,20056 Dynamic Models Most of the challenging, interesting, and useful design work comes during dynamic modeling. –The interaction diagrams are typically where we apply design patterns such as the GRASP patterns. If the most important skill in object design is assigning behavior to objects, this is when it usually takes place. Dynamic UML models include –sequence, –communication, –state machine –and deployment diagrams.

Dr. Kivanc DincerCS319 Week 6 - Oct.17,20057 Static Models If behavior is designed during dynamic modeling, it is the static models, such as the class diagrams, which give the overall structure to our software, and allow us to divide the work into manageable and maintainable chunks. Static UML models include –class, –package, –and deployment diagrams.

Dr. Kivanc DincerCS319 Week 6 - Oct.17,20058 The Importance of Object Design Skill over UML Notation Skill UML is only an ancillary tool to object design. The real skill is the design, not the diagramming. Seeking a software design job because you are good at making UML diagrams is like seeking a career as a novelist because you have good penmanship.

Dr. Kivanc DincerCS319 Week 6 - Oct.17,20059 Other Object Design Techniques: CRC Cards An alternative to UML Object Design is the Class, Responsibility, Collaboration Cards popularized by Kent Beck in eXtreme Programming. –There are some brief examples in the text, but you should get a book on eXtreme Programming or go to a Web site if you are interested.

Dr. Kivanc DincerCS319 Week 6 - Oct.17, CRC Cards

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Chapter 15 UML Interaction Diagrams Objectives Provide a reference for frequently used UML interaction diagram notation – sequence and communication diagrams “Cats are smarter than dogs. You can’t get eight cats to pull a sled through snow.” - Jeff Waldez

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Introduction Why do objects exist? –To perform an activity to help fulfill a system’s purpose UML interaction diagrams are used to illustrate how objects interact via messages. –They are used for dynamic object modeling. Interaction Diagrams provide a thoughtful, cohesive, common starting point for inspiration during programming

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Interaction Diagrams There are two common types: –Sequence diagrams –Communication diagrams Both diagram types are semantically equivalent, however, they may not show the same information –Communication Diagrams emphasize the structural organization of objects, while Sequence Diagrams emphasize the time ordering of messages –Communication Diagrams explicitly show object linkages, while links are implied in Sequence Diagrams

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Sequence diagram Fig Communication diagram

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Communication diagram Fig Sequence diagram

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Comparison of Diagrams TypeStrengthsWeaknesses Sequence Diagram -clearly shows sequence or time ordering of messages. - large set of detailed notation options. - forced to extend to the right when adding new objects; consumes horizontal space Communication Diagram Space economical – flexibility to add new objects in two dimensions. -more difficult to see sequence of messages. -fewer notation options.

Basic Sequence Diagram Notation

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Lifeline boxes to Show participants in interactions

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Singletons in interaction diagrams

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Messages and focus of control with execution specification bar (activation bar)

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Two ways to show a return result from a message.

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Messages to `this`

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Instance creation and object lifelines

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Object destruction

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Example UML frame (regions or fragments of the diagrams) Frame OperatorMeaning altAlternative fragment for mutual exclusion loopLoop fragment while guard is true optOptional fragment that executes if guard is true parParallel fragments that execute in parallel regionCritical region within which only one thread can run

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig A conditional message / Optional fragment that executes if guard is true

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig A conditional message in UML 1.x notation – a simple style.

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Mutually exclusive conditional messages. /Alternative fragment for mutual exclusion

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Iteration over a collection using relatively explicit notation Fig Iteration over a collection using more implicit notation

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Nesting of frames

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Example interaction occurrence, sd and ref frames.

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Invoking class or static methods.

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Modeling polymorphic cases.

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Asynchronous calls and active objects

Basic Communication Diagram Notation

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Link lines Fig Messages

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Messages to `this`

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Instance creation

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Sequence numbering

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Complex sequence numbering

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Conditional message

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Mutually exclusive messages

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Iteration

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Iteration over a collection

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Messages to a class object (static message invocation)

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig An approach to modeling polymorphic cases.

Dr. Kivanc DincerCS319 Week 6 - Oct.17, Fig Asynchronous call