1 / 6

Chapter 11

Chapter 11. Operation Contracts. Operation Contracts. A tool of requirements analysis (OOA) that describes in great detail the changes required by a system operation. Analysis of what must happen, not how . Stated in terms of postconditions :

arlais
Download Presentation

Chapter 11

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 11 Operation Contracts

  2. Operation Contracts • A tool of requirements analysis (OOA) that describes in great detail the changes required by a system operation. • Analysis of what must happen, not how. • Stated in terms of postconditions: • Observations about the domain model objects that are true when the operation has finished. • Describe state changes: • Instance creation and deletion. • Attribute change of value. • Associations formed and broken.

  3. System operations handle input system events

  4. Sections of a Contract • Operation: • Name of operation and parameters. • Cross References: • Use cases this operation can occur within. • Preconditions: • Noteworthy assumptions about state of system before execution of operation. • Postconditions: • The state of objects in the Domain Model after completion of the operation.

  5. An Example Contract Operation: enterItem( itemID: ItemID, quantity: integer ) Cross References: Use Cases: Process Sale Preconditions: There is a sale underway. Postconditions: • A SalesLineItem instance sli was created. • sli was associated with the current Sale. • sli.quantity became quantity. • sli was associated with a ProductDescription, based on itemID match.

  6. When to use Contracts • High-complexity domains. • For system operations that are complex and perhaps subtle in their results. • Don’t clutter up a use case with fine-grained details. • DON’T write contracts if developers can easily infer what to do from the use case.

More Related