Slide 10A.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.

Slides:



Advertisements
Similar presentations
UML (Sequence Diagrams, Collaboration and State Chart Diagrams) Presentation By - SANDEEP REDDY CHEEDEPUDI (Student No: ) - VISHNU CHANDRADAS (Student.
Advertisements

Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
© 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.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Systems Analysis and Design in a Changing World, Fourth Edition
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.
Slide 6C.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Slide 6B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Slide 11C.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Slide 7D.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
Slide 10B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Slide 8B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
1 More on UML Xiaojun Qi. 2 The Current Version of UML Like all modern computer languages, UML is constantly changing –When this book was written, the.
Slide 7B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Slide 7C.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
© Copyright Eliyahu Brutman Programming Techniques Course.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
Slide 7A.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Slide 5C.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Slide 6A.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Slide 5B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Slide 12C.50 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005.
Case Study: Class Extraction.
Unified Modeling Language
Object-Oriented Analysis and Design
Chapter 7: The Object-Oriented Approach to Requirements
Objects What are Objects Observations
Slide 16A.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering.
Slide 15.1 Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved. Object-Oriented Software Engineering WCB/McGraw-Hill, 2008 Stephen.
Slide 16B.51 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering.
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.
Lecture 7 Object Oriented Design. Outline  What is UML and why we use UML?  How to use UML diagrams to design software system?  What UML Modeling tools.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
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.
Slide 10A.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Object-Oriented Systems Analysis and Design Mr Gavuna
1 Analysis Extracting from Use Cases to Create Diagrams.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
CS3773 Software Engineering Lecture 04 UML Class Diagram.
EEL5881 Software Engineering I UML Lecture Yi Luo.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
An Introduction to the Unified Modeling Language
Slide 12A.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour UML Sequence Diagram.
Appendix D UML at a Glance Summary prepared by Kirk Scott 1.
CSE 403, Spring 2008, Alverson Using UML to express Software Architecture.
Slide 10A.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Systems Analysis and Design in a Changing World, Fourth Edition
Slide 12D.88 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Chapter 3: Introducing the UML
Slide 12F.135 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
1 Kyung Hee University Interaction Diagrams Spring 2001.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
Lecture 13. Unified Modeling Language (UML) The first applications you wrote in CS201 were easy to think out and code with no intermediate steps. Lab.
UML (Unified Modeling Language)
Object-Oriented Analysis and Design
Unified Modeling Language
Object-Oriented and Classical Software Engineering Eighth Edition, WCB/McGraw-Hill, 2011 Stephen R. Schach.
Chapter 20 Object-Oriented Analysis and Design
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
CSE470 Software Engineering UML Lecture.  UML resource page
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
Presentation transcript:

Slide 10A.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with UML and the Unified Process McGraw-Hill, 2004 Stephen R. Schach

Slide 10A.2 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. CHAPTER 10 — Unit A MORE ON UML

Slide 10A.3 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter Overview l UML Is Not a Methodology l Class Diagrams l Notes l Use-Case Diagrams l Stereotypes l Interaction Diagrams l Statecharts l Activity Diagrams l Packages l Component Diagrams

Slide 10A.4 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter Overview (contd) l Deployment Diagrams l Review of UML Diagrams l UML and Iteration

Slide 10A.5 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. The Current Version of UML l Like all modern computer languages, UML is constantly changing –When this book was written, the latest version of UML was Version 1.4 –By now some aspects of UML may have changed l UML is now under the control of the Object Management Group (OMG) –Check for updates at the OMG Web site,

Slide 10A.6 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. UML Is Not a Methodology l UML is an acronym for Unified Modeling Language –UML is therefore a language l A language is simply a tool for expressing ideas

Slide 10A.7 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. UML Is Not a Methodology l UML is a notation, not a methodology –It can be used in conjunction with any methodology l UML is not merely a notation, it is the notation l UML has become a world standard –Every information technology professional today needs to know UML

Slide 10A.8 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. UML Is Not a Methodology (contd) l The title of this chapter is “More on UML” –Surely it should be “All of UML”? l The manual for Version 1.4 of UML is nearly 600 pages long –Complete coverage is not possible l Surely every information technology professional must know every aspect of UML?

Slide 10A.9 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. UML Is Not a Methodology (contd) l UML is a language l The English language has over 100,000 words –We can manage fine with just a subset l The small subset of UML presented in Chapters 3 through 9 is adequate for the purposes of this book l The larger subset of UML presented in this chapter is adequate for the systems analysis and design of most information systems

Slide 10A.10 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. UML Is Not a Methodology (contd) l UML can be used for modeling all kinds of software –This book is on systems analysis and design, not the full life cycle –This book is on information systems, not other types of software l Those features of UML most appropriate for the systems analysis and design of information systems are included in this book

Slide 10A.11 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Class Diagrams l A class diagram depicts classes and their interrelationships l Here is the simplest possible class diagram

Slide 10A.12 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Class Diagrams (contd) l Class diagram showing more details of Bank Account Class l Add as many (or as few) details as appropriate for the current iteration and incrementation

Slide 10A.13 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Class Diagrams: Notation (contd) l Freedom of notation extends to objects l Example: –bank account : Bank Account Class l Bank account is an object, an instance of a class Bank Account Class –The underlining denotes an object –The colon denotes “an instance of” –The bold face and initial upper case letters in Bank Account Class denote that this is a class

Slide 10A.14 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Class Diagrams: Notation (contd) l UML allows a shorter notation when there is no ambiguity –bank account

Slide 10A.15 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Class Diagrams: Notation (contd) l The UML notation for modeling the concept of an arbitrary bank account is –: Bank Account Class l The colon means “an instance of,” so : Bank Account Class means “an instance of class Bank Account Class” l This notation has been widely used in the interaction diagrams of Chapters 6 and 7

Slide 10A.16 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Class Diagrams: Visibility Prefixes (contd) l UML visibility prefixes (used for information hiding) –Prefix + indicates that an attribute or operation is public »Visible everywhere –Prefix – denotes that the attribute or operation is private »Visible only in the class in which it is defined –Prefix # denotes that the attribute or operation is protected »Visible either within the class in which it is defined or within subclasses of that class

Slide 10A.17 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Class Diagrams: Visibility Prefixes (contd) l Example: –Class diagram with visibility prefixes added –Attribute accountBalance is visible only within the Bank Account Class –Operations deposit and withdraw are accessible from anywhere within the information system

Slide 10A.18 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Aggregation l Example: “A car consists of a chassis, an engine, wheels, and seats”

Slide 10A.19 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Aggregation (contd) l The open diamonds denote aggregation –Aggregation is the UML term for the part–whole relationship l The diamond is placed at the “whole” (car) end, not the “part” (chassis, engine, wheels, or seats) end of the line connecting a part to the whole

Slide 10A.20 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Multiplicity l Example: “A car consists of one chassis, one engine, 4 or 5 wheels, an optional sun roof, zero or more fuzzy dice hanging from the rear-view mirror, and 2 or more seats”

Slide 10A.21 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Multiplicity (contd) l The numbers next to the ends of the lines denote multiplicity –The number of times that the one class is associated with the other class

Slide 10A.22 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Multiplicity (contd) l Item 1: –The line connecting Chassis Class to Car Class »The 1 at the “part” end of the line denotes that there is one chassis involved »The 1 at the “whole” end denotes that there is one car involved –Each car has one chassis, as required –Similar observations hold for the line connecting Engine Class to Car Class

Slide 10A.23 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Multiplicity (contd) l Item 2: –The line connecting Wheels Class to Car Class »The 4..5 at the “part” end together with the 1 at the “whole” end denotes that each car has from 4 to 5 wheels (the fifth wheel is the spare) –A car has 4 or 5 wheels, as required »Instances of classes come in whole numbers only

Slide 10A.24 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Multiplicity (contd) l Item 3: –The line connecting Sun Roof Class to Car Class »Two dots.. denote a range, so the 0..1 means zero or one, the UML way of denoting “optional” –A car has an optional sun roof, as required

Slide 10A.25 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Multiplicity (contd) l Item 4: –The line connecting Fuzzy Dice Class to Car Class »The * by itself means zero or more –Each car has zero or more fuzzy dice hanging from the rear-view mirror, as required

Slide 10A.26 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Multiplicity (contd) l Item 5: –The line connecting Seats Class to Car Class »An asterisk in a range denotes “or more,” so the 2..* means 2 or more –A car has two or more seats, as required

Slide 10A.27 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Multiplicity (contd) l If the exact multiplicity is known, use it –Example: The 1 that appears in 8 places l If the range is known, use the range notation –Examples: 0..1 or 4..5 l If the number is unspecified, use the asterisk –Example: * l If the range has upper limit unspecified, combine the range notation with the asterisk notation –Example: 2..*

Slide 10A.28 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Composition l Aggregation example: Every chess board consists of 64 squares l This relationship goes further –It is an instance of composition, a stronger form of aggregation

Slide 10A.29 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Composition (contd) l Association –Models the part–whole relationship l Composition –Also models the part–whole relationship –In addition, every part may belong to only one whole –If the whole is deleted, so are the parts l Example: A number of different chess boards –Each square belongs to only one board –If a chess board is thrown away, all 64 squares on that board go as well

Slide 10A.30 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Composition (contd) l Composition is depicted by a solid diamond

Slide 10A.31 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Inheritance l Inheritance is a required feature of object orientation l Inheritance is a special case of generalization –The UML notation for generalization is an open triangle –Sometimes the open triangle is labeled with a discriminator

Slide 10A.32 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Generalization l Every instance of Asset Class or its subclasses has an attribute assetType (the discriminator) –This attribute can be used to distinguish between instances of the subclasses

Slide 10A.33 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Association l Example of association:

Slide 10A.34 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Association (contd) l The association between the two classes may be modeled as a class –Example: Suppose the radiologist consults the lawyer on a number of occasions, each one for a different length of time »A class diagram is needed such as that depicted in the next slide

Slide 10A.35 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Association (contd) l Now consults has become a class, Consults Class, which is called an association class –Because it is both an association and a class

Slide 10A.36 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Notes l A comment in a UML diagram is called a note –A rectangle with the top right-hand corner bent over –A dashed line is drawn from the note to the item to which the note refers

Slide 10A.37 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Use-Case Diagrams l A use case is a model of the interaction between –External users of an information system (actors) and –The information system itself »More precisely, an actor is a user playing a specific role l A use-case diagram is a set of use cases

Slide 10A.38 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Use-Case Diagrams (contd) l Generalization of actors is supported –The open triangle points toward the more general case

Slide 10A.39 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Stereotypes l A stereotype in UML is a way of extending UML l Stereotypes already encountered include –Boundary, control, and entity classes, and –The «include» stereotype l The names of stereotypes appear between guillemets –Example: «This is my own construct»

Slide 10A.40 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Stereotypes (contd) l Example: Use case Estimate Funds Available for Week incorporates use case Estimate Investment Income for Week

Slide 10A.41 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Stereotypes (contd) l In the «extend» relationship, one use case is a variation of the standard use case –Example: A separate use case to model the situation of the potential seller of a painting turning down Osbert’s offer –The open-headed arrow goes in the other direction

Slide 10A.42 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Interaction Diagrams l Interaction diagrams show how objects interact with one another l UML supports two types of interaction diagrams –Sequence diagrams –Collaboration diagrams

Slide 10A.43 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Sequence Diagrams l Example: Dynamic creation followed by destruction of an object

Slide 10A.44 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Sequence Diagrams (contd) l The lifelines in the sequence diagram –An active object is denoted by a thin rectangle (activation box) in place of the dashed line l Creation of the : Masterpiece Class object is denoted by the lifeline starting at the point of dynamic creation l Destruction of that object after it receives message »9: Destroy object is denoted by the heavy X

Slide 10A.45 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Sequence Diagrams (contd) l A message is optionally followed by a message sent back to the object that sent the original message l Even if there is a return, it is not necessary that a specific new message be sent back –Instead, a dashed line ending in an open arrow indicates a return from the original message, as opposed to a new message

Slide 10A.46 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Sequence Diagrams (contd) l There is a guard on the message »9: [offer rejected] Destroy object –Only if Osbert’s offer is rejected is message 9 sent l A guard (condition) is something that is true or false –The message sent only if the guard is true l The purpose of a guard –To ensure that the message is sent only if the relevant condition is true

Slide 10A.47 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Sequence Diagrams (contd) l Iteration an indeterminate number of times is modeled by an asterisk (Kleene star) l Example: Elevator (see next slide) »*move up one floor –The message means: “move up zero or more floors”

Slide 10A.48 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Sequence Diagrams (contd) l Sequence diagram for elevator

Slide 10A.49 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Sequence Diagrams (contd) l An object can send a message to itself –A self-call l Example: –The elevator has arrived at a floor –The elevator doors now open and a timer starts –At the end of the timer period the doors close again –The elevator controller sends a message to itself to start its timer — this self-call is shown in the previous UML diagram

Slide 10A.50 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Collaboration Diagrams l Collaboration diagrams are equivalent to sequence diagrams –All the features of sequence diagrams are equally applicable to collaboration diagrams l Use a sequence diagram when the transfer of information is the focus of attention l Use a collaboration diagram when concentrating on the classes

Slide 10A.51 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Continued in Unit 10B