BTS430 Design Model: Sequence Diagrams involving collections.

Slides:



Advertisements
Similar presentations
UK Intellectual Property Office is an operating name of the Patent Office Filing an online request for an extension of time in proceedings procedure demonstration.
Advertisements

UK Intellectual Property Office is an operating name of the Patent Office Filing an online notice of defence and counterstatement in opposition proceedings.
© Annie Patton Credit Cards One of the most popular forms of credit Next Slide.
IS424 - Assignment#1 DFD + Use-Cases Kingdom of Saudi Arabia
And so to Code. Forward, Reverse, and Round-Trip Engineering Forward Engineering Reverse Engineering Round-Trip Engineering.
© 2010 Bennett, McRobb and Farmer1 Use Case Description Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
Object Design Examples with GRASP
Business Analysis & Data Design ITEC-630 Spring 2008
Internet Applications Update Internet Rechartering August 26, 2009.
Information System Engineering
Jan 15, Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Iteration: a simple cash-only success scenario of Process Sale.
January Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box.
Jan 16, Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Iteration 1: a simple cash-only success scenario of Process Sale.
Jan Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box Actors.
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.
January Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Elaboration Iteration 1: a simple cash-only success scenario of.
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” - may be of.
Chapter 15 Interaction Diagrams. Most Common Sequence Diagram Communication Diagram Sequence Diagrams illustrate interactions between classes of a program.
Multimedia & Website Design Use Cases in UML. What’s Up Today? What you’ll learn in this lecture :- Use Case diagrams and their application –Why they.
Information for students Welcome to the S 3 P system. Login to the system by entering your User ID and password. The User ID is the same as your normal.
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH 1 Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 More on use cases System sequence.
Sept Ron McFadyen1 Extend Relationship.
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.
Use Case Analysis From soft systems methodology to understanding the system functionality.
Use Cases 2 ENGR ♯10 Peter Andreae
Credit Cards One of the most popular forms of credit Next Slide.
Software Engineering 1 Object-oriented Analysis and Design Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative.
BTS330 Documenting Use Cases.
Introduction to Sequence Diagrams
DOMAIN MODEL— PART 2: ATTRIBUTES SYS466. Looking For Potential Classes “Know the business”. Ask Questions Identify business concepts; filter nouns (person,
1 Sub-Phase Low Level Design (cont). Janice Regan, Map of design phase DESIGN HIGH LEVEL DESIGN Modularization User Interface Module Interfaces.
Chapter 26 GoF Design Patterns. The Adapter Design Pattern.
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
BTS430 Design Model: Sequence Diagrams. BTS430 Use case Model Domain Model Design Model Code.
Sept Ron McFadyen1 Section 10.1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain.
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Writing Use Cases: Requirements in Context.
How To Register for Redland City Futsal Head to and select “PLAYER REGISTRATION”
Review ♦ System sequence diagram ♦ Domain model
BTS430 Systems Analysis and Design using UML Interaction Diagrams.
Chapter 4: UML Interaction Diagrams. Objective Provide a reference for frequently used UML interaction diagram notation- sequence and communication diagrams.
Behavioral Modeling Chapter 8.
UML January 26, 2011 CSE 403, Winter 2011, Brun UML Sequence Diagrams.
Chapter 9 Applying UML and Patterns -Craig Larman
1 A Student Guide to Object- Oriented Development Chapter 6 Identifying Functionality.
Use Case Modeling Example By: Dr. Issam Al-Azzoni.
COMP-350 Object-Oriented Analysis and Design Drawing System Sequence Diagrams Reference: Larman, Chapter 9.
DESIGN PART 2: OBJECT-LEVEL SEQUENCE DIAGRAMS WITH AN EXAMPLE OF COMPOSITION BTS430 Systems Analysis and Design using UML.
SYS466 Casual Use Case Specifications. Systems Use Case Diagrams and Specifications Based on the dialog metaphor Based on the dialog metaphor The process.
1 Examining Execution Sequences Introducing Sequence Diagrams.
Scenario A scenario is a sequence of steps describing an interaction between a user and a system. Use case is a set of scenarios tied together by a common.
Phase 6 Start: Saturday14 April End: Saturday 21 April
1 LAB What is Collaboration diagram? 4 Collaboration diagrams illustrate the interaction between the objects, using static spatial structure. 4.
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” Used to capture and describe.
Chapters 10, 11 SSD (Revision) SD DCD Exam Object-Oriented Design.
IntellAgile Copyright © 2002 Craig Larman. All rights reserved. Writing Use Cases: Requirements in Context.
OO Methodology Elaboration Phase Iteration 1- Part 3.
BTS430 Systems Analysis and Design using UML Design Class Diagrams (ref=chapter 16 of Applying UML and Patterns)
SYSTEM-LEVEL SEQUENCE DIAGRAMS Sys466. System-Level Sequence Diagrams  Use cases describe how external actors interact with the software system…  An.
DOMAIN MODEL—PART 2: ATTRIBUTES BTS430 Systems Analysis and Design using UML.
Bank Reconciliation Chapter 4. PAGE REF #CHAPTER 4: Bank Reconciliation SLIDE # 2 Objectives Reconcile your checking Create bank reconciliation reports.
Requirements capture: Using UML Use Cases David Millard and Yvonne Howard {dem,
System Sequence Diagrams and Operation Contracts
UML Interaction Diagrams
Webapp Design with System Sequence Diagrams
System Sequence Diagrams
Interaction diagrams.
Use Case Modeling Example
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
Use cases Dr. X.
Presentation transcript:

BTS430 Design Model: Sequence Diagrams involving collections

Opening Up “the black box”  Let’s look at how collections (lists) are handled …* * Larman, Chapter 15, pages

Iteration over a collection  A common algorithm is to iterate over all members of a collection (such as a list or map), sending the same message to each. Often, some kind of iterator object is ultimately used, such as an implementation of java.util.Iterator or a C++ standard library iterator, although in the sequence diagram that low- level "mechanism" need not be shown in the interest of brevity or abstraction.

Iteration over a collection  At the time of this writing, the UML specification did not (and may never) have an official idiom for this case. Two alternatives are shown—reviewed with the leader of the UML 2 interaction specification—in Figure and Figure

Figure Iteration over a collection using relatively explicit notation.

 Note the selector expression lineItems[i] in the lifeline of Figure The selector expression is used to select one object from a group. Lifeline participants should represent one object, not a collection.

Figure Iteration over a collection using relatively explicit notation.  In Java, for example, the following code listing is a possible implementation that maps the explicit use of the incrementing variable i in Figure to an idiomatic solution in Java, using its enhanced for statement (C# has the same).

Java code for Figure public class Sale { private List lineItems = new ArrayList (); public Money getTotal() { Money total = new Money(); Money subtotal = null; for ( SalesLineItem lineItem : lineItems ) { subtotal = lineItem.getSubtotal(); total.add( subtotal ); } return total; } // … }

Figure Iteration over a collection leaving things more implicit.  Another variation is shown in Figure 15.17; the intent is the same, but details are excluded. A team or tool could agree on this simple style by convention to imply iteration over all the collection Elements.

Figure Iteration over a collection leaving things more implicit.

An example of a sequence diagram using a list The Parking Lot Example

Actor (Parking Clerk)System The parking clerk requests to start a new registration The system displays a list of parking lots which have available spaces, time periods, and a customer and vehicle information form. The clerk checks off that the customer is staff and enters the customer information—name, address, phone, campus address, and the car ownership information, including make, model, colour and plate number. The clerk also selects the appropriate time period for the parking pass. The clerk then requests to proceed with the registration. The system checks if the customer has any overdue school fees or unpaid fines. The customer does not. The system redisplays all of the entered information so that the clerk can review it with the customer. The clerk requests to pay.The system displays a payment screen. The customer is paying by credit card so the clerk enters card number and expiry. Once everything is entered the clerk requests to proceed The system validates the credit card with the bank system, submits the payment for processing to the bank and creates an invoice. The system also creates a new parking pass record for the customer, vehicle, lot, and timeframe selected. The quantity of available spaces for the lot selected is reduced by one. The parking pass record includes a parking pass ID. The system then displays the invoice (which can be printed) showing customer name and ID, lot, time frame, parking pass ID, method of payment and the total paid.

The parking clerk requests to start a new registration The system displays a list of parking lots which have available spaces, time periods, and a customer and vehicle information form. Who should take responsibility for retrieving all lot information (there are many parking lots)? The handler, because the lot object only knows about one lot—itself. The handler creates an empty array (or list) of Lot objects. In the sequence diagram you don’t need to show this or you can show this as in the diagram below—what this says is that a handler creates a lot object or each entry in the array. In the sequence diagram lotList[lotInd] is the lot object at position lotInd in the array lotList.

The clerk checks off that the customer is staff and enters the customer information—name, address, phone, campus address, and the car ownership information, including make, model, colour and plate number. The clerk also selects the appropriate time period for the parking pass. The clerk then requests to proceed with the registration. The system checks if the customer has any overdue school fees or unpaid fines. The customer does not. The system redisplays all of the entered information so that the clerk can review it with the customer. Notes: In this part of the sequence diagram the system will need to create staff and vehicle objects. Another design decision/consideration is the following: perhaps we should create a parking pass object here? After all, the lot is selected and we have date information. Note also that I have shown the parking pass object asking the lot for the lot name. This is not specifically in the scenario but it is something that will probably be required. Notice also that I have named the Staff object s, the Vehicle object v and the ParkingPass object pp so that I can refer to them in the parameters.

The clerk checks off that the customer is staff and enters the customer information—name, address, phone, campus address, and the car ownership information, including make, model, colour and plate number. The clerk also selects the appropriate time period for the parking pass. The clerk then requests to proceed with the registration. The system checks if the customer has any overdue school fees or unpaid fines. The customer does not. The system redisplays all of the entered information so that the clerk can review it with the customer.

The customer is paying by credit card so the clerk enters card number and expiry. Once everything is entered the clerk requests to proceed The system validates the credit card with the bank system, submits the payment for processing to the bank and creates an invoice. The system also creates a new parking pass record for the customer, vehicle, lot, and timeframe selected. The quantity of available spaces for the lot selected is reduced by one. The parking pass record includes a parking pass ID. The system then displays the invoice (which can be printed) showing customer name and ID, lot, time frame, parking pass ID, method of payment and the total paid. Notes: If we look at the domain class diagram we see Payment and CreditCard classes. At this point in the design I think that payment would be handled by the bank system—it would keep any payment records required; all we would need to know is that the invoice was paid. We might need some kind of payment type; and normally we would stop and design that but for simplicity’s sake we’re modeling without it right now. Also, instead of modeling the bank system as an actor, when we get more information and are modeling in more detail we might model an interface to the bank system, for example a BankSystemAdapter.

The customer is paying by credit card so the clerk enters card number and expiry. Once everything is entered the clerk requests to proceed The system validates the credit card with the bank system, submits the payment for processing to the bank and creates an invoice. The system also creates a new parking pass record for the customer, vehicle, lot, and timeframe selected. The quantity of available spaces for the lot selected is reduced by one. The parking pass record includes a parking pass ID. The system then displays the invoice (which can be printed) showing customer name and ID, lot, time frame, parking pass ID, method of payment and the total paid.