Operation Contracts in Applying UML and Patterns
18 Questions
1 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

In a Point of Sale (POS) system, what step follows the cashier entering the item identifier?

  • System records sale line item (correct)
  • Cashier repeats steps 3-4 until done
  • System presents total with taxes calculated
  • System handles payment
  • What is the purpose of the 'makeNewSale' operation in the POS domain model?

  • To calculate the total with taxes
  • To process a completed sale
  • To initialize a new sale instance (correct)
  • To handle customer payment
  • Which entity in the POS domain model is associated with the 'enterItem' operation?

  • Register
  • Sale (correct)
  • Cashier
  • Customer
  • What triggers the system to present the total with taxes calculated in a POS system?

    <p>Customer indicates they are done</p> Signup and view all the answers

    Which operation in the POS domain model involves 'currentDate(), currentTime(), and nextSaleNum()'?

    <p>makeNewSale()</p> Signup and view all the answers

    What is the main purpose of the 'Logscompleted' entity in the POS domain model?

    <p>To track completed sales</p> Signup and view all the answers

    What aspect of the system does an operation contract help identify?

    <p>System state changes when an operation happens</p> Signup and view all the answers

    What do preconditions in an operation contract describe?

    <p>State of objects in the Domain Model before executing the operation</p> Signup and view all the answers

    Which section of an operation contract is considered the most important?

    <p>Postconditions</p> Signup and view all the answers

    What is NOT included in the postconditions section of an operation contract?

    <p>Actions to be performed during the operation</p> Signup and view all the answers

    What does a domain model help generate when creating an operation contract?

    <p>Operation names and parameters</p> Signup and view all the answers

    When creating an operation contract, what should be described regarding the system?

    <p>State before and after the action, both pre and post conditions</p> Signup and view all the answers

    What happens as a postcondition of the 'enterItem' operation?

    <p>sli is associated with a ProductDescription based on itemId match</p> Signup and view all the answers

    What is an outcome of the 'makePayment' operation postconditions?

    <p>'s.isComplete' becomes true</p> Signup and view all the answers

    What does the 'endSale' operation modify?

    <p>'s.isComplete'</p> Signup and view all the answers

    In the 'enterItem' operation, what is initialized to the input quantity?

    <p>'sli.quantity'</p> Signup and view all the answers

    What does the 'makePayment' operation associate 'p' with?

    <p>'Store'</p> Signup and view all the answers

    In the postconditions of 'enterItem', how many associations are created with 'ProductSpecification1'?

    <p>None</p> Signup and view all the answers

    More Like This

    Use Quizgecko on...
    Browser
    Browser