Presentation is loading. Please wait.

Presentation is loading. Please wait.

Week 4 Operational Contracts Requirements to Design Logical Architecture.

Similar presentations


Presentation on theme: "Week 4 Operational Contracts Requirements to Design Logical Architecture."— Presentation transcript:

1 Week 4 Operational Contracts Requirements to Design Logical Architecture

2 OO Analysis and Design Process Domain Model Classes Attributes Associations Use Cases System Sequence Diagrams Interaction Diagrams Operation Contracts Software Object Design ** Classes Communications Operations and Methods Don’t get hung up on terminology.  Architecture -System vs Logical  Domain Model vs Domain Layer

3 Chapter 11 Operational Contracts What are they? When and Why are they used?

4 Fig. 11.1

5 Operational Contract “Contracts describe changes that are likely required in the software objects.” Detailed description of behavior –Consider it optional but useful Components of a contract: –Operation signature – just a name –Cross reference – refer to use cases –Pre conditions – assumption about the state –Post conditions – state after completion

6 Example: enterItem Operation: enterItem(itemID: ItemID, quantity: interger Cross Reference: Use Cases: ProcessSale Preconditions: There is a sale underway Postconditions: A SalesLineItem instance sli was created sli was associated with current Sale sli.quantity became quantity sli was assoicated with a ProductDescription, based on itemID match

7 Fig. 11.2 Events trigger operations Process sale

8 Post Conditions Changes in the state of objects in the domain model Observations not operations Three domain object state changes –Instance created or deleted –Attribute value changed –Association formed or broken

9 When Are Contracts Useful When complexity of required state changes too awkward/detailed to capture in use cases Describe what happens, not how –Sales Line Item associated with the sale by stapling papers Proof of correctness (axiomatic semantics) Testing and verification

10 How to Create and Write Contracts Past tense descriptions and observations Stage and curtain analogy How complete? Best guess is a good start Better to start with something that can be improved Improves analysis and understanding Useful for operations that are “complex and subtle.” Go back and update the Domain Model as needed. Do one for your project – just to do it.

11 Summary Update the domain model? When? –System operations that are complex or subtle Most common mistake? –Forgetting associations


Download ppt "Week 4 Operational Contracts Requirements to Design Logical Architecture."

Similar presentations


Ads by Google