end of analysis

10
System sequence diagram Operation contract End of analysis

Upload: brent

Post on 22-Feb-2016

25 views

Category:

Documents


0 download

DESCRIPTION

End of analysis. System sequence diagram Operation contract. We have. Functional requirement Use case model Use case diagram Brief use case description Ranking of the use cases Fully dressed for the most important Information requirement Domain model - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: End of analysis

System sequence diagramOperation contract

End of analysis

Page 2: End of analysis

We have

Functional requirementUse case model

Use case diagramBrief use case descriptionRanking of the use casesFully dressed for the most important

Information requirementDomain model

The classes in the system and the structure between them

Page 3: End of analysis

Moving from analyses to design

System sequence diagramFor each fully dressed use case make a system sequence diagramFor each system operation that changes the state of the domain model write an operation contract (we will not do much about operation contracts in this course just mention their existence)

Page 4: End of analysis

System sequence diagram

: Cashier :System

Simple cash-only Process Sale scenario:

1. Customer arrives at a POS checkoutwith goods and/or services to purchase.2. Cashier enters item identifier andquantity, if greater than one.3. System records sale line item andpresents item description, price, andrunning total.Cashier repeats steps 2-3 until indicatesdone.4. System presents total with taxescalculated.5. Cashier tells Customer the total, andasks for payment.6. Customer pays with cash.7. Cashier enters cash tendered.8. System records payment and presentschange due.7. System logs the completed sale, butdoes not interact with external systems.8. System presents receipt.9. Customer leaves with receipt and goods.

enterItem(itemID, quantity)

endSale()

makePayment(amount)

description, total

total with taxes

change due, receipt

* [more items]

In the systems sequence diagram the system is seen as a black box.

The system events(the arrows between the actor an the system) are found from the Fully dressed descriptionThe response from the system can shown as dottet linies

Page 5: End of analysis

System events

Name the system event with a verbPut the values (parameters) on Response from the system can be shown as information on a dotted lineLoops can be shown as a box around system events. Please see the book for details on how it is written in UML

Page 6: End of analysis

System operations and contract

A system operation is an operation the system has to offer, to handle the system events.There are different kind op system operations, the one that changes the state of the domain model is the one you should consider making a contract on.The contract describe in detail what state the domain model is in after the system operation.

Page 7: End of analysis

System operation changing the state of the domain model

: Cashier:System

addLineItem(itemID, quantity)

endSale()

makePayment(amount)

description, total

total with taxes

change due, receipt

* [more items]

makeNewSale()

these input system eventsinvoke system operations

the system eventmakeNewSale invokes asystem operation calledmakeNewSale and so forth

this is the same as in object-oriented programming whenwe say the message fooinvokes the method (handlingoperation) foo

Page 8: End of analysis

Example of operation contract

Saledatatime 1 1..*1 1..*

SalesLineItemquantity

0..* 10..*

ProductSpecificationdescriptionpriceitemID

Operations contractOperation: addLineItem (itemID, quantity)Use-cases: Process salePrecondition: A Sale instance (object) has been createdPost conditions:

A SalesLineItem instance (object) sli was createdsli was associated with the current Salesli.quantity became quantitysli was associated with a ProductSpecification (object), based on itemID match (association formed).

Part of the domain model

Page 9: End of analysis

Operation contracts

Operations contractOperation: addLineItem (itemID, quantity)Use-cases: Process salePrecondition: A Sale instance (object) has been

createdPostconditions:

A SalesLineItem instance (object) sli was createdsli was associated with the current Salesli.quantity became quantitysli was associated with a ProductSpecification (object), based on itemID match (association formed).

Important notes:Reference to the use casePrecondition: what information has to be present in the system, before theoperations startsPostcondition:Which object has been createdWhich attributes has been changedWhich object structure has been created

Page 10: End of analysis

Ready to move from what to how