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 (C)</p> Signup and view all the answers

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

<p>makeNewSale() (A)</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 (B)</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 (A)</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 (A)</p> Signup and view all the answers

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

<p>Postconditions (A)</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 (D)</p> Signup and view all the answers

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

<p>Operation names and parameters (D)</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 (C)</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 (B)</p> Signup and view all the answers

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

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

What does the 'endSale' operation modify?

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

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

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

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

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

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

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

More Like This

CDI de chantier et d'opération
37 questions
CDI de chantier ou d’opération
36 questions
Operations Contracts Schema
5 questions
Use Quizgecko on...
Browser
Browser