© 2005 Prentice Hall9-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.

Slides:



Advertisements
Similar presentations
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
Advertisements

Sucha Smanchat  Steps in OOAD using UML  Use Case Diagram  Sequence Diagram / Communication Diagram  Class Diagram  State.
Systems Analysis and Design in a Changing World, Fourth Edition
Object-Oriented Analysis and Design
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
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.
© 2005 Prentice Hall12-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
© 2005 Prentice Hall8-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
© 2005 Prentice Hall3-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Unified Modeling Language (UML)
1 SWE Introduction to Software Engineering Lecture 15 – System Modeling Using UML.
Software Engineering I Object-Oriented Design
© 2005 Prentice Hall5-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
Unified Modeling Language
Object-Oriented Analysis and Design
Object-Oriented Analysis and Design
Objectives Design Class Diagrams Issues in system design Generalization Review UML papers.
The Design Discipline.
Systems Analysis and Design in a Changing World, Fifth Edition
Systems Analysis and Design in a Changing World, Fifth Edition
12 Systems Analysis and Design in a Changing World, Fifth Edition.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
1 SAD2 - UML 4 th Lecture Class Diagram in Construction Phase Patterns Case Study Lecturer: Dr Dimitrios Makris
Unified Modeling Language, Version 2.0
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Approaching a Problem Where do we start? How do we proceed?
Systems Analysis and Design in a Changing World, 3rd Edition
Systems Analysis and Design 8 th Edition Chapter 6 Object Modeling.
ניתוח מערכות מידע 1 Unified Modeling Language (UML) § § The Unified Modeling Language (UML) is the industry-standard language for: Specifying, Visualizing,
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
An Introduction to the Unified Modeling Language
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
What is Object-Oriented?  Organization of software as a collection of discreet objects that incorporate both data structure and behavior.
Chapter 10 Defining Classes. The Internal Structure of Classes and Objects Object – collection of data and operations, in which the data can be accessed.
CS 4233 Review Feb February Review2 Outline  Previous Business – My.wpi.edu contains all grades to date for course – Review and contact.
Relationships Relationships between objects and between classes.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Chapter 16 UML Class Diagrams 1CS6359 Fall 2012 John Cole.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design,
Object Modeling THETOPPERSWAY.COM. Object Modelling Technique(OMT)  Building a model of an application domain and then adding implementation.
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 5th Edition Copyright © 2015 John Wiley & Sons, Inc. All rights.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
BTS430 Systems Analysis and Design using UML Design Class Diagrams (ref=chapter 16 of Applying UML and Patterns)
Basic Characteristics of Object-Oriented Systems
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
Enterprise Systems Modeling EGN 5621 Enterprise Systems Collaboration (Professional MSEM) Fall, 2012.
11 Systems Analysis and Design in a Changing World, Fifth Edition.
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
CHAPTER
Systems Analysis and Design With UML 2
The Object Oriented Approach to Design
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Understand and Use Object Oriented Methods
Copyright 2007 Oxford Consulting, Ltd
Stumpf and Teague Object-Oriented Systems Analysis and Design with UML
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
Presentation transcript:

© 2005 Prentice Hall9-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML

© 2005 Prentice Hall9-2 Learning Objectives Understand the components of a design class diagram and how it differs from a domain model. Determine which associations are required to support the messages from the interaction diagrams. Know when to use qualified associations.

© 2005 Prentice Hall9-3 Learning Objectives (continued) Understand visibility and why it is important. Draw a complete design class diagram. Measure the design quality using the properties of cohesion, coupling, and the Law of Demeter. Write the method signatures.

© 2005 Prentice Hall9-4 Overview Interaction diagrams are dynamic models of object-oriented software. They show in sequence the internal messages triggered when the façade object receives a message from an actor. Step 2 of object-oriented program design produces a design class diagram based on the interaction diagrams.

© 2005 Prentice Hall9-5 Overview (continued) A design class diagram is a static model of the entire system. It combines the interaction diagrams to show only the links between classes and the direction of visibility between classes.

© 2005 Prentice Hall9-6 Overview (continued) Step 3 of object-oriented program design specifies precisely the composition of each message and the algorithm for each operation in the program. At this point, the design of the software in the business layer is complete.

© 2005 Prentice Hall9-7 Components of a Design Class Diagram A design class diagram follows the same UML graphic conventions as a domain model. A design class diagram shows: Classes and class hierarchies Attributes Operations Whole-to-part associations Qualified associations

© 2005 Prentice Hall9-8 Qualified Associations A qualified association associates two objects using a qualifier to select objects at the other end of the association. A qualifier is an attribute or set of attributes which has a unique value for each object in the class.

© 2005 Prentice Hall9-9 Qualified Associations (continued).

© 2005 Prentice Hall9-10 Visibility Visibility is the ability of one object to have a reference to (to “see”) another object. This reference is the object’s internal identifier.

© 2005 Prentice Hall9-11 Visibility (continued) There are four ways to obtain visibility in an object-oriented system: 1.Reference visibility (Navigability): The client object has a pointer or reference to the server object. 2.Parameter visibility: An object is provided by a message as a parameter. 3.Local visibility: An object obtains visibility to another object by declaring it inside one of its methods. 4.Global visibility: An object is obtained from a class by an object requiring visibility to it.

© 2005 Prentice Hall9-12 Procedure for Object-Oriented Program Design Step 1. Produce an interaction diagram for each system operation identified during analysis. Step 2. Produce a design class diagram showing the operations from the interaction diagrams. Step 3. Specify the signature and the algorithm for each operation.

© 2005 Prentice Hall9-13 Procedure for Object-Oriented Program Design (continued) Step 4. Design the graphical user interface. Step 5. Define the interface to the presentation layer. Step 6. Define the interface to the storage layer. Step 7. Place the classes in packages.

© 2005 Prentice Hall9-14 Step 2 of Object-Oriented Program Design Produce a design class diagram showing the operations from the interaction diagrams: Step 2.1: Identify classes with their behavior. Step 2.2: Add inheritance to the class diagram. Step 2.3: Add associations to the class diagram. Step 2.4: Create a final class diagram with qualified associations.

© 2005 Prentice Hall9-15 Step 2.1 of Object-Oriented Program Design Identify classes with their behavior.

© 2005 Prentice Hall9-16 Step 2.1 of Object-Oriented Program Design (continued) Identify classes with their behavior.

© 2005 Prentice Hall9-17 Step 2.2 of Object-Oriented Program Design Add inheritance to the class diagram.

© 2005 Prentice Hall9-18 Step 2.3 of Object-Oriented Program Design Add associations to the class diagram.

© 2005 Prentice Hall9-19 Step 2.4 of Object-Oriented Program Design Create a final class diagram with qualified associations.

© 2005 Prentice Hall9-20 Object-Oriented Design Quality There are three common guidelines for assessing and improving the quality of object-oriented program design: Cohesion Coupling The Law of Demeter

© 2005 Prentice Hall9-21 Cohesion Cohesion measures how strongly related and focused the responsibilities of a class are – that is, how diverse an object’s attributes and behaviors are. It is desirable to have objects with high cohesion. Using the Expert pattern helps increase cohesion.

© 2005 Prentice Hall9-22 An Example of Poor Cohesion.

© 2005 Prentice Hall9-23 Coupling Coupling measures how strongly one class is connected to, has knowledge of, or relies on other objects. It is desirable to have objects with low coupling. Giving too much responsibility to the façade object leads to poor coupling.

© 2005 Prentice Hall9-24 Sources of Coupling Subclasses are strongly connected to their superclasses. Other sources of coupling are classes which have: A reference to another class or an object in that class. A method which references another class or an object in that class. An association with another class.

© 2005 Prentice Hall9-25 An Example of Increased Coupling.

© 2005 Prentice Hall9-26 The Law of Demeter The Law of Demeter states that a client should give its server the responsibility for collaborating with other objects. An object should send messages only to: Itself An object to which it contains a reference A parameter of one of its methods One of its local objects A class

© 2005 Prentice Hall9-27 A Violation of The Law of Demeter.

© 2005 Prentice Hall9-28 Specifying Data Types Data type is the UML term for the description of an attribute of a class. Data types are either primitive data types or value objects. A primitive data type can be represented directly in computer hardware – integer, floating point, or character.

© 2005 Prentice Hall9-29 Specifying Data Types (continued) A value object is an object whose unique identity is not meaningful. A reference object is an object whose unique identity is meaningful. Reference objects are never shown as attributes in a class diagram; they are shown as associations.

© 2005 Prentice Hall9-30 Signatures A signature is a specification of an operation which describes completely the interface of the operation. This comprises the operation’s: name, and every input and output with its data type.

© 2005 Prentice Hall9-31 Specifying Attributes in the UML Attributes are described as: - name : data type Where the first symbol represents the attribute’s visibility: - for private + for public # for protected

© 2005 Prentice Hall9-32 Specifying Operations in the UML Operations are described in the sequence operation visibility, operation name, parameter list, and type returned by the operation: + operation name ( in parameter name : parameter type …, out parameter name : parameter type …, inout parameter name : parameter type, ) : return type

© 2005 Prentice Hall9-33 Example of Specifying an Operation.

© 2005 Prentice Hall9-34 Example of Specifying an Operation (continued).

© 2005 Prentice Hall9-35 Summary Step 2 of object-oriented program design produces a design class diagram. This diagram shows the interactions from the interaction diagrams, visibilities, and may show qualified associations. Coupling, cohesion, and the Law of Demeter are used to refine the diagram. Defining the signatures and algorithms for all the operations completes the design of the business layer.