McGraw-Hill/Irwin© 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 17 Object-Oriented Design and Modeling Using the UML.

Slides:



Advertisements
Similar presentations
Chapter 11 Designing the User Interface
Advertisements

An Introduction to Object Modeling
Karolina Muszyńska Based on:
Chapter 6: Behavioral Modeling
18-1 Verifying Object Behavior and Collaboration Role playing – the act of simulating object behavior and collaboration by acting out an object’s behaviors.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
Interaction Diagrams Activity Diagram State Machine Diagram
Department of Computing
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 18 Object-Oriented Design and Modeling Using the UML.
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.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 3rd Edition Copyright © 2009 John Wiley & Sons, Inc. All rights.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
Lecture 4 Class Responsibility Collaboration Cards
© 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.
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 18 Object-Oriented Design and Modeling Using the UML.
Lecturer: Dr. AJ Bieszczad Chapter 66-1 Object-Oriented analysis and design Special nature of OO development Use cases Design with UML OO system design.
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
Chapter 13: Designing the User Interface
Unified Modeling Language
Object-Oriented Analysis and Design
Object-Oriented Analysis and Design
The chapter will address the following questions:
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
Chapter 7: The Object-Oriented Approach to Requirements
Chapter 5: Modeling Systems Requirements: Events and Things
Systems Analysis and Design in a Changing World, Fifth Edition
Systems Analysis and Design in a Changing World, Fifth Edition
Chapter 7 Structuring System Process Requirements
1 Chapter 2 (Cont.) The BA’s Perspective on Object Orientation.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
Systems Analysis and Design in a Changing World, Fifth Edition
Chapter 4 – Requirements Engineering Lecture 3 1Chapter 4 Requirements engineering.
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.
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
Behavioral Modeling Chapter 8.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 8: Analysis Modeling Software Engineering: A Practitioner’s Approach, 6/e Chapter.
2 Object-Oriented Analysis and Design and the Unified Process Objectives  Explain the purpose and objectives of object- oriented design  Develop design.
Chapter 16 Applying UML and Patterns Craig Larman
7 Systems Analysis and Design in a Changing World, Fifth Edition.
NJIT UML Class Diagrams Chapter 16 Applying UML and Patterns Craig Larman.
5 Systems Analysis and Design in a Changing World, Fifth Edition.
Introduction to Object Modeling
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
CIS 112 Exam Review. Exam Content 100 questions valued at 1 point each 100 questions valued at 1 point each 100 points total 100 points total 10 each.
Use Case Driven Analysis Requirements Use Case Use Case Description System Sequence Diagram Chapter 5.
Geospatial Systems Design and UML Or Looking at “OMT-G: An Object-Oriented Data Model for Geographic Applications” by Karla A.V. Borges, Clodoveu A. Davis.
Design Model Lecture p6 T120B pavasario sem.
Systems Analysis and Design in a Changing World, Fourth Edition
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
INFO 620Lecture #71 Information Systems Analysis and Design Design Class Diagrams and others INFO 620 Glenn Booker.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design,
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 5th Edition Copyright © 2015 John Wiley & Sons, Inc. All rights.
Chapter 6: Structuring Requirements: Use Case Description and Diagrams Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Chapter 7 Part II Structuring System Process Requirements MIS 215 System Analysis and Design.
Use-Case Model: Adding Detail with Operation Contracts.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
Chapter 7 Behavioral Modeling Brandon A. Jones Stand and Deliver ITEC March 6, 2011.
11 Systems Analysis and Design in a Changing World, Fifth Edition.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
CIS 375 Bruce R. Maxim UM-Dearborn
Chapter 22 Object-Oriented Systems Analysis and Design and UML
CIS 375 Bruce R. Maxim UM-Dearborn
Object Oriented System Design Class Diagrams
Presentation transcript:

McGraw-Hill/Irwin© 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 17 Object-Oriented Design and Modeling Using the UML

17-2 Objectives Understand entity, interface, control, persistence, and system classes. Understand the concepts of dependency and navigability. Define visibility and explain its three levels. Understand the concept object responsibility and how it is related to message sending between object types. Describe the activities involved in object-oriented design. Differentiate between a design use-case narrative and an analysis use-case narrative. Describe CRC card modeling. Model class interactions with sequence diagrams. Construct a class diagram that reflects design specifics. Model object states with state machine diagrams.

17-3 Object-Oriented Design Object-oriented design (OOD) – an approach used to specify the software solution in terms of collaborating objects, their attributes, and their methods. –Continuation of object-oriented analysis

17-4 Design Classes In OO programming every piece of code resides inside an object class

17-5 Types of Design Classes Entity Class - contains business related information and implements analysis classes. Interface Class - provides the means by which an actor interacts with the system. –A window, dialogue box, or screen. –For nonhuman actors, an application program interface (API). Control Class - contains application logic. Persistence Class - provides functionality to read and write to a database. System Class - handles operating system- specific functionality.

17-6 Design Relationships - Dependency A dependency relationship is used to model the association between two classes: –To indicate that when a change occurs in one class, it may affect the other class. –To indicate the association between a persistent class and a transient class. Interface classes typically are transient –Illustrated with a dashed arrow

17-7 Design Relationships - Navigability Classes with associations can navigate (send messages) to each other. By default the associations are bidirectional. Sometimes you want to limit the message sending to only one direction. Illustrated with an arrow pointing in the direction a message can be sent.

17-8 Attribute and Method Visibility Visibility – the level of access an external object has to an attribute or method. –Public attributes/methods can be accessed/invoked by any other method in any other object or class. Denoted by the + symbol –Protected attributes/methods can be accessed/ invoked by any method in the same class or in subclasses of that class. Denoted by the # symbol –Private attributes/methods can be accessed/invoked by any method in the same class. Denoted by the – symbol Method – the software logic that is executed in response to a message.

17-9 Object Responsibilities Object responsibility – the obligation that an object has to provide a service when requested and thus collaborate with other objects to satisfy the request if required. –An object responsibility is implemented by the creation of methods that may have to collaborate with other objects and methods.

17-10 Object Responsibility

17-11 The Process of Object-Oriented Design Refining the use case model to reflect the implementation environment. Modeling class interactions, behaviors, and states that support the use case scenario. Updating the class diagram to reflect the implementation environment.

17-12 Refining The Use Case Model Step 1: Transform the “Analysis” Use Cases to “Design” Use Cases –Implementation details –Controls –Window/web page names –Navigation instructions Step 2: Update the Use Case Model Diagram and Other Documentation to Reflect any New Use Cases

17-13 Design Use Case

17-14 Modeling Class Interactions, Behaviors, and States Step 1: Identify and Classify Use-Case Design Classes Step 2: Identify Class Attributes Step 3: Identify Class Behaviors and Responsibilities Step 4: Model Object States Step 5: Model Detailed Object Interactions

17-15 Step 1: Identify and Classify Use-Case Design Classes Interface, Control, and Entity Classes of Place New Order Use Case Interface ClassesController ClassesEntity Classes W00-Member Home Page W02-Member Profile Display W03-Display Order Summary W04-Display Order Confirmation W09-Member Account Status Display W11-Catalog Display W15-Product Detail Display Place New Order HandlerBilling Address Shipping Address Address Active Member Member Order Member Ordered Product Product Title Audio Title Game Title Video Title Transaction

17-16 Step 2: Identify Class Attributes Many attributes already identified during object-oriented analysis. Revised use cases may mention additional attributes. Must update class diagram to include new attributes.

17-17 Step 3: Identify Class Behaviors and Responsibilities Analyze use cases to identify required system behaviors –Search for verb phrases –Some will reflect manual actions, others automated Associate behaviors and responsibilities with classes Model classes that have complex behavior Examine class diagram for additional behaviors Verify classifications

17-18 Condensed Behavior List Condensed Behavior List for Place New Order Use Case BehaviorsClass Type Process new member orderControl Retrieve product catalog informationEntity Display W11-Catalog Display windowInterface Retrieve member demographic informationEntity Display W02-Member Profile Display windowInterface Validate quantity amountEntity Verify the product availabilityEntity Determine an expected ship dateEntity Determine cost of the total orderEntity Display W03-Order Summary Display windowInterface Prompt userInterface Check Status of member accountEntity...

17-19 Tools for Identifying Behaviors and Responsibilities Class Responsibility Collaboration (CRC) Card - a card that lists all behaviors and responsibilities assigned to a class. –Often built interactively in a group setting that walks through a use case Sequence diagram - a UML diagram that models the logic of a use case by depicting the interaction of messages between objects in time sequence.

17-20 CRC Card Listing Behaviors and Collaborators of a Class Object Name: Member Order Sub Object: Super Object: Transaction Behaviors and ResponsibilitiesCollaborators Report order information Calculate subtotal cost Calculate total order cost Update order status Create Ordered Product Delete Ordered Product Member Ordered Product

17-21 Sequence Diagram 1.Actor 2.Interface class 3.Controller class 4.Entity classes 5.Messages 6.Activation bars 7.Return messages 8.Self-call 9.Frame

17-22 Another Sequence Diagram

17-23 Guidelines for Constructing Sequence Diagrams Identify the scope of the sequence diagram, whether entire use-case scenario or one step. Draw actor and interface class if scope includes that. List use-case steps down the left-hand side. Draw boxes for controller class and each entity class that must collaborate in the sequence (based on attributes or behaviors previously assigned). Add persistence and system classes if scope includes that. Draw messages and point each to class that will fulfill the responsibility. Add activation bars to indicate object instance lifetimes. Add return messages as needed for clarity. Add frames for loops, optional steps, alternate steps, etc.

17-24 Step 4: Model Object States Object state – a condition of the object at one point in its lifetime. State transition event –occurrence that triggers a change in an object’s state through updating of one or more of its attribute values. State machine diagram – a UML diagram that depicts: –the combination of states that an object can assume during its lifetime, –the events that trigger transitions between states, –the rules governing the objects in transition.

17-25 Object State Example

17-26 State Machine Diagram

17-27 Verifying Object Behavior and Collaboration Role playing – the act of simulating object behavior and collaboration by acting out an object’s behaviors and responsibilities. –Participants may assume the role of an actor on an object type –Message sending is simulated by using an item such as a ball that is passed between the participants. –Useful for discovering missing objects and behaviors.

17-28 Updating Object Model to Reflect Implementation Environment Design class diagram – a diagram that depicts classes that correspond to software components that are used to build the software application. Includes: –Classes –Associations and gen/spec and aggregation relationships –Attributes and attribute-type information –Methods with parameters –Navigability –Dependencies

17-29 Transforming Analysis Class Diagram to Design Class Diagram Add design objects to diagram Add attributes and attribute-type information to design objects Add attribute visibility Add methods to design objects Add method visibility Add association navigability Add dependency relationships

17-30 Four Implicit Object Behaviors Create new instances Update data or attributes Delete instances Display information

17-31 Partial Design Class Diagram