1 / 11

Week 4

Week 4. Operational Contracts Requirements to Design Logical Architecture. OO Analysis and Design Process. Domain Model Classes Attributes Associations Use Cases System Sequence Diagrams Interaction Diagrams Operation Contracts Software Object Design ** Classes Communications

ranit
Download Presentation

Week 4

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. 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

More Related