Software Engineering 1 Object-oriented Analysis and Design Chap 31 More SSDs and Contracts.

Slides:



Advertisements
Similar presentations
Object Design Examples with GRASP
Advertisements

System Sequence Diagrams
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.
January Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box.
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.
Object-Oriented Analysis and Design
Drawing System Sequence Diagrams
Jan 2005 Ron McFadyen1 Contracts Used to help understand requirements more completely (and so may not always be necessary) based on assertions;
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 10 System Sequence Diagrams. What is a System Sequence Diagram? A way of modeling input and output events related to systems It is a picture that.
NJIT Use Case Model Operation Contracts Prepared By: Sumit Sharma.
NJIT Drawing System Sequence Diagrams Chapter 10 Applying UML and Patterns Craig Larman Presented by Anuradha Dharani.
Object-Oriented Analysis and Design
Sept Ron McFadyen1 Extend Relationship.
Use Case Model Operation Contracts Prepared By: Sumit Sharma and Sravanthi Gillala.
חוזים – Contracts 1. Larman – Chapter 10 – SSDs 10.2 What are System Sequence Diagrams? (introduction) Use cases describe how external actors interact.
9/18/011 Software Requirements Analysis and Design (Continued)
LECTURE 5 SEQUENCE DIAGRAM 1. INTRODUCTION – SYSTEM SEQUENCE DIAGRAM A system sequence diagram is a fast and easily created artifact that illustrates.
TK2023 Object-Oriented Software Engineering CHAPTER 6 SYSTEM SEQUENCE DIAGRAMS.
Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative Development Part III Elaboration Iteration I – Basic1.
SENG 403 SENG 403 – Winter  Brief introduction to SSD  Example (A sales systems (Cashier))  Example (Monopoly game) SENG 403 – Winter 2012.
System Sequence Diagrams
INFO 620Lecture #51 Information Systems Analysis and Design Sequence and Collaboration Diagrams INFO 620 Glenn Booker.
Software Engineering 1 Object-oriented Analysis and Design Chap 30 Relating Use Cases.
CSSE 374: Operations Contracts and Logical Architectures Steve Chenoweth Office: Moench Room F220 Phone: (812)
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.
Object Oriented Analysis and Design System Events & Contracts.
GRASP: Designing Objects With Responsibilities Chapter 17 Applying UML and Patterns -Craig Larman.
Object Design Examples with GRASP (Ch. 18)
Use Case Model Operation Contracts Chapter 11 Applying UML and Patterns Craig Larman.
Review ♦ System sequence diagram ♦ Domain model
Group 2 work What is sequence diagram ? What is sequence diagram ? Why do we use it ? Why do we use it ? What is basic notation of SD? What is basic notation.
1 Lecture 6: Operation Contracts. 2 Overview  What is contract ?  The guidelines for writing contracts for the system operations.  Use Case realizations.
Operation Contracts: Getting ready to open the “System” black box All material from Applying UML and Patterns, 3 rd Edition, Craig Larman, chapter 11.
♦ Use Case Model  Detailled use case - Important  Use case diagram- Refactoring Use case diagram  > 1 Last Lectures.
Chap 28 UML Activity Diagrams and Modeling
Chapter 1 Applying UML and Patterns. The Need for Software Blueprints Knowing an object-oriented language and having access to a library is necessary.
Larman ch. 131 Use-Case Model : Adding Detail with operation contracts Larman ch. 13.
Object-Oriented Analysis and Design CHAPTER 10: SYSTEM SEQUENCE DIAGRAMS 1.
Drawing System Sequence Diagrams
COMP-350 Object-Oriented Analysis and Design Drawing System Sequence Diagrams Reference: Larman, Chapter 9.
Use Case Driven Analysis Requirements Use Case Use Case Description System Sequence Diagram Chapter 5.
System sequence diagram M Taimoor Khan
DOMAIN MODEL: ADDING ATTRIBUTES Identify attributes in a domain model. Distinguish between correct and incorrect attributes.
Software Engineering 1 Object-oriented Analysis and Design Chap 24 Iteration 2 More Patterns.
Operation Contracts. Primary way to describe system behavior is with use cases Operation contracts provide more details in terms of state changes to objects.
System Sequence Diagram Chandan Rupakheti & Steve Chenoweth Week 5-3a.
TK2023 Object-Oriented Software Engineering CHAPTER 12 Introduction to Responsibility-Driven Design.
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
Understanding Requirements
GRASP: Designing Objects With Responsibilities
OO Methodology Elaboration Phase Iteration 1- Part 3.
Summary from previous lectures
1 Chapter 9: Operation Contracts Chapter 13 in Applying UML and Patterns Book.
Use-Case Model: Adding Detail with Operation Contracts.
1 Design Model Use-Case realizations with GRASP Larman chapter 17.
SYSTEM-LEVEL SEQUENCE DIAGRAMS Sys466. System-Level Sequence Diagrams  Use cases describe how external actors interact with the software system…  An.
1 Object Oriented Analysis and Design System Events & Contracts.
OO Methodology Elaboration Phase Iteration 1- Part 2.
System Sequence Diagrams and Operation Contracts
Webapp Design with System Sequence Diagrams
DESIGN MODEL: USE-CASE REALIZATIONS WITH GRASP PATTERNS
Sequence Diagrams.
Sequence Diagrams Lecture 6.
System Sequence Diagrams(SSD)
Operation Contracts Ch. 11.
Presentation transcript:

Software Engineering 1 Object-oriented Analysis and Design Chap 31 More SSDs and Contracts

Software Engineering 2 Object-oriented Analysis and Design NextGen POS 1  New System Sequence Diagrams m In the current iteration, the new payment handling requirements involve new collaborations with external systems. m To review, SSDs use sequence diagram to illustrate inter-system collaborations, treating each system as a blackbox.  To illustrate the new system events in SSDs in order to clarify: m new system operations that the NextGen POS system will need to support m calls to other systems, and the responses to expect from these calls  Common Beginning of Process Sale Scenario m The SSD for the beginning portion of a basic scenario includes makeNewSale, enterItem, and endSale system events; it is common regardless of the payment method

Software Engineering 3 Object-oriented Analysis and Design NextGen POS 2 enterItem(itemID, quantity) : NextGenPOS System : Cashier endSale Process Sale Scenario Description.total total with taxes makeNewSale «actor» : TaxCalculator taxLineItems= getTaxes(sale) [more items ] loop

Software Engineering 4 Object-oriented Analysis and Design NextGen POS 3 Credit payment SSD makeCreditPayment (credNum,expiryDate) reply=requestApproval(request) :Customer postReceivable(receivable) :NextGenPOS System «actor» :CreditAuthorization Service «actor» :Accounts postSale(sale)

Software Engineering 5 Object-oriented Analysis and Design NextGen POS 4  In both cases of credit and check payments, a assumption (for this iteration) - the payment is exactly equal to the sale total, and a different amount does not have be an input parameter.  the call to the external CreditAuthorization Service is modeled as a regular synchronous message with a return value. m This is an abstraction that could be implemented with a SOAP request over secure HTTPS, or any remote communication mechanism.  The makeCreditPayment system operation and the use case assume m the credit information (credit account number and expiry date) of the customer is coming from a credit card (reader).  when a credit authorization service approves a credit payment, it owes the store for the payment; thus, a receivables entry needs to be added to the accounts receivable system.

Software Engineering 6 Object-oriented Analysis and Design NextGen POS 5  Check payment SSD. makeCheckPayment (driversLicenseNumber) reply=requestApproval(request) :Cashier :NextGenPOS System «actor» :CheckAuthorization Service

Software Engineering 7 Object-oriented Analysis and Design NextGen POS 6  In this iteration, the new system operations must handle are: m makeCreditPayment m makeCheckPayment  In the first iteration, the system operation for the cash payment was simply makePayment. m Now that the payments are of different types, it is renamed to makeCashPayment.  To review, system operation contracts are an optional requirements artifact (part of the Use-Case Model) m Usually, the use case text is itself sufficient, and these contracts aren't useful. m But on occasion they bring value by their precise and detailed approach to identifying what happens when a complex operation is invoked on the system, in terms of state changes to objects defined in the Domain Model.

Software Engineering 8 Object-oriented Analysis and Design NextGen POS 7  Contract CO5: makeCreditPayment m Operation:makeCreditPayment( creditAccountNumber, expiryDate ) m Cross References:Use Cases: Process Sale m Preconditions: An underway sale exists and all items have been entered m Postconditions:  a CreditPayment pmt was created  pmt was associated with the current Sale sale  a CreditCard cc was created; cc.number = creditAccountNumber, cc.expiryDate = expiryDate  cc was associated with pmt  a CreditPaymentRequest cpr was created  pmt was associated with cpr  a ReceivableEntry re was created  re was associated with the external AccountsReceivable  sale was associated with the Store as a completed sale  postcondition indicating the association of a new receivable entry in accounts receivable.

Software Engineering 9 Object-oriented Analysis and Design NextGen POS 8  During testing, it is clear from this post-condition that the accounts receivable system should be tested for the presence of a new receivable entry.  Contract CO6: makeCheckPayment m Operation:makeCheckPayment( driversLicenceNumber ) m Cross References:Use Cases: Process SalePreconditions:An underway sale exists and all items have been entered. m Postconditions:  a CheckPayment pmt was created  pmt was associated with the current Sale sale  a DriversLicense dl was created; dl.number = driversLicenseNumber  dl was associated with pmt  a CheckPaymentRequest cpr was created.  pmt was associated with cpr  sale was associated with the Store as a completed sale