Ch 11 - operation complete When Are Contracts Useful When...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Click to edit Master subtitle style Chapter - 11 Operation Contracts
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Chapter Objectives Define system operations Create contracts for system operations
Background image of page 2
Sections of a Contract Operation Name of operation Parameters Cross references Use cases operation can occur within Preconditions State of system or objects before execution of operation Postconditions State of system or objects after completion of operation
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
System Operation Operations offered as black box in the public interface Events or I/Os messages Implies system has system operations to handle event
Background image of page 4
Postconditions Describes changes in the state of objects in the domain model Instances created Associations formed or broken Attributes changed Are not actions performed during the operation Observations of domain model objects true when
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: operation complete When Are Contracts Useful When details and complexity of state changes awkward or too detailed to capture in use cases Avoid writing contracts if developers understand what to do Creating & Writing Contracts 1. Identify system operations from SSDs 2. If system operation complex, construct a contract 3. Describe postcondition using these categories Instance creation and deletion Attribute modification Associations formed and broken Forgetting to include forming of associations most common mistake Object Constrain Language Formal, rigorous pre- and postcondition language Defines official format Unless compelling reason to learn – don’t use...
View Full Document

{[ snackBarMessage ]}

Page1 / 8

Ch 11 - operation complete When Are Contracts Useful When...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online