Fall 2009AXS-3913 Ron McFadyen Visibility Visibility: the ability of one object to see or have a reference to another object. e.g. When a register object.

Slides:



Advertisements
Similar presentations
Software Engineering 1 Object-oriented Analysis and Design Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative.
Advertisements

Object Design Examples with GRASP
Object-Oriented Analysis and Design CHAPTERS 15: UML INTERACTION DIAGRAMS 1.
Visibility Larman, Chapter 19 (with ideas from George Blank of NJIT) CSE432 Object Oriented Software Engineering.
Jan 15, Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Iteration: a simple cash-only success scenario of Process Sale.
Jan 23, Ron McFadyen1 SSD for a samplePOS Use Case Figure 13.1 Input Events invoke a system operation of the same name same idea as in object-oriented.
Sept Ron McFadyen Interaction Diagrams - Chapter 15 Describe/illustrate sequence of message exchanges among objects that are working together.
Oct Ron McFadyen Visibility Visibility: the ability of one object to see or have a reference to another object. e.g. When a register object.
Oct 22, Ron McFadyen1 Design Class Diagrams n Class diagram with – classes – associations – attributes – methods – navigability – interfaces,
March Ron McFadyen1 Ch 17: Use Case Realizations with GRASP Patterns Assigning responsibilities to objects to achieve user goals Section 17.4.
Interaction Diagrams - Chapter 15 Describe/illustrate sequence of message exchanges among objects that are working together to achieve some functionality.
Jan Ron McFadyen1 Consider a simple cash-only Process Sale scenario 1. Customer arrives at a POS checkout with goods and/or services to purchase.
Sept Ron McFadyen Interaction Diagrams - Chapter 15 Describe/illustrate sequence of message exchanges among objects that are working together.
Oct Ron McFadyen1 Ch 17: Use Case Realizations with GRASP Patterns P. 248: “The assignment of responsibilities and design of collaborations.
Fall 2009ACS-3913 Ron McFadyen1 Design Class Diagrams n Class diagram with – classes – associations – attributes – methods – navigability – interfaces,
Copyright W. Howden1 Lecture 7: Functional and OO Design Descriptions.
Jan 2005 Ron McFadyen1 Contracts Used to help understand requirements more completely (and so may not always be necessary) based on assertions;
Sept Ron McFadyen Sequence Diagram Objects are represented horizontally across the top of the diagram The first object is typically an Actor,
Sept Ron McFadyen Interaction Diagrams - Chapter 15 Describe/illustrate sequence of message exchanges among objects that are working together.
ACS-3913Fall 2009 Ron McFadyen1 Contracts Used to help understand requirements more completely (and so may not always be necessary) based on assertions;
Oct Ron McFadyen Visibility Visibility: the ability of one object to see or have a reference to another object. e.g. When a register object.
Feb 4, Ron McFadyen1 Design Class Diagrams n Class diagram with – classes – associations – attributes – methods – navigability – (interfaces,
Feb Ron McFadyen1 Use Case Realizations with GRASP Patterns “The assignment of responsibilities and design of collaborations are very important.
November Ron McFadyen1 Design Class Diagrams n Class diagram with – classes – associations – attributes – methods – navigability – interfaces,
Fall 2009ACS-3913 R. McFadyen1 Protected Variations Principle: How do you design so that variations in the future do not have an undesirable affect on.
Object-Oriented Analysis and Design
NJIT Designing for Visibility Chapter 19 Applying UML and Patterns Craig Larman.
November Ron McFadyen Visibility Visibility: the ability of one object to see or have a reference to another object. e.g. When a register object.
Sept Ron McFadyen1 Extend Relationship.
Feb 4, Ron McFadyen1 founded on principles of good OO design idea was first put forth by Christopher Alexander (1977) in their work concerning.
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.
Object-Oriented Analysis and Design
Object-Oriented Design. From Analysis to Design Analysis Artifacts –Essential use cases What are the problem domain processes? –Conceptual Model What.
Objectives Design Class Diagrams Issues in system design Generalization Review UML papers.
INFO 620Lecture #51 Information Systems Analysis and Design Sequence and Collaboration Diagrams INFO 620 Glenn Booker.
Chapter 18 Object Design Examples with GRASP. Objectives Design use case realizations –A use-case realization describes how a particular use case is realized.
1 Ch 18. Object Design Examples With Grasp Objectives Design use case realizations. Apply GRASP to assign responsibilities to classes. Apply UML to illustrate.
Chapter 26 GoF Design Patterns. The Adapter Design Pattern.
Object Design Examples with GRASP (Ch. 18)
BTS430 Systems Analysis and Design using UML Interaction Diagrams.
Design Class Diagrams (DCDs)
Chapter 16 Applying UML and Patterns Craig Larman
NJIT UML Class Diagrams Chapter 16 Applying UML and Patterns Craig Larman.
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
Fall 2009ACS-3913 Ron McFadyen1 Use Case Realizations with GRASP Patterns “The assignment of responsibilities and design of collaborations are very important.
Object-Oriented Analysis and Design Week 11, 2009.
INFO 620Lecture #71 Information Systems Analysis and Design Design Class Diagrams and others INFO 620 Glenn Booker.
OO Methodology Elaboration Phase Iteration 1- Part 3.
Design. 2 The Need for Software Blueprints Knowing an object-oriented language and having access to a library is necessary but not sufficient in order.
TK2023 Object-Oriented Software Engineering CHAPTER 11 CLASS DIAGRAMS.
Use-Case Model: Adding Detail with Operation Contracts.
 The Sequence Diagram models the collaboration of objects based on a time sequence.  It shows how the objects interact with others in a particular scenario.
Oct 3, Ron McFadyen1 GRASP Patterns 1.Expert 2.Creator 3.Controller 4.Low Coupling 5.High Cohesion.
INFO 620Lecture #101 Information Systems Analysis and Design Implementation Concerns, Review INFO 620 Glenn Booker.
Design Model: Determining Visibility CH-18. Objectives Identify four kinds of visibility. Design to establish visibility. Illustrate kinds of visibility.
Software Engineering 1 Object-oriented Analysis and Design Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative.
Ch 17: Use Case Realizations with GRASP Patterns
Mapping Designs to Code. It specify how to map the design into object oriented language The UML artifacts created during the design work, the interaction.
Object Design Examples with GRASP
System Sequence Diagrams and Operation Contracts
Used to help understand requirements more completely
Chapter 16 UML Class Diagrams.
GRASP: Visibility and Design
Chapter 10: Visibility Chapter 18 in Applying UML and Patterns Book.
Chapter 20 Applying UML and Patterns Craig Larman
Chapter 11: Class Diagram
Object Oriented System Design Class Diagrams
Implementation Model: Mapping Designs to Code
Chapter 11: Class Diagram
Design Model: Creating Design Class Diagrams
Presentation transcript:

Fall 2009AXS-3913 Ron McFadyen Visibility Visibility: the ability of one object to see or have a reference to another object. e.g. When a register object sends a message to a sale object, the register must have visibility to the sale. enterItem() :Register:Sale 2:makeLineItem() Register has to know about sale in order to send this message. The sale must be visible to the register.

Fall 2009AXS-3913 Ron McFadyen Visibility from Register to Product Catalogue is required due to the collaboration diagram Visibility : Register enterItem (itemID, quantity) : ProductCatalog spec := getProductDesc( itemID ) { public void enterItem( itemID, qty ) {... spec = catalog. getProductDesc(itemID)... } } class Register {... private ProductCatalog catalog;... }

Fall 2009AXS-3913 Ron McFadyen Visibility Visibility from A to B can occur in four ways: Attribute B is an attribute of A Parameter B is a parameter of a method of A Local B is a non-parameter local object in a method of A Global B is globally visible

Fall 2009AXS-3913 Ron McFadyen Attribute Visibility Register has an attribute that holds the reference to the catalog, and so register has attribute visibility to the Product Catalog. This is very common. : Register enterItem (itemID, quantity) : ProductCatalog desc := getProductDesc( itemID ) { public void enterItem(itemID, qty) {... desc = catalog.getProductDesc(itemID)... } } class Register {... private ProductCatalog catalog;... }

Fall 2009AXS-3913 Ron McFadyen Parameter Visibility In our collaboration, register asks the product catalog to find a specific product specification. The catalog returns the product specification to the register, and register passes that on the sale. Sale will just pass that product specification on to the sales line item, and so the sale only has parameter visibility to the product specification

Fall 2009AXS-3913 Ron McFadyen from Parameter to Attribute visibility

Fall 2009AXS-3913 Ron McFadyen Local Visibility The enterItem method of Register has an attribute that will hold a product specification. When the method ends, the attribute value is lost. Visibility here is temporary – while the method executes. The visibility is local to the method. : Register enterItem (itemID, quantity) : ProductCatalog spec := getSpecification( itemID ) { enterItem(id, qty) {... // local visibility via assignment of returning object ProductSpecification spec = catalog.getSpecification(id);... } }

Fall 2009AXS-3913 Ron McFadyen showing visibility in the UML

Fall 2009AXS-3913 Ron McFadyen DCD with dependency relationships indicating non-attribute visibility

Fall 2009AXS-3913 Ron McFadyen DCD with dependency relationships indicating non-attribute visibility Dependency of Sale on Product Specification is shown with a dashed directed line. Sale has parameter visibility to Product Specification Dependency of Register on Product Specification is shown with a dashed directed line. Register has local visibility to Product Specification – register’s enterItem method gets a reference to a product specification and passes that on to the sale Attribute Dependencies are shown with the solid directed lines