CS FundamentalsHardWipro · Accenture pattern

A use case diagram shows a base use case 'Place Order' with an arrow labelled <<extend>> pointing from 'Apply Discount Code' to 'Place Order', and a separate arrow labelled <<include>> from 'Place Order' to 'Validate Payment'. What is the difference in meaning between these two relationships?

  1. A. <<include>> is conditional and <<extend>> is mandatory, the reverse of the usual convention
  2. B. <<extend>> means Place Order cannot run without Apply Discount Code first
  3. C. <<include>> means Validate Payment always runs as a mandatory part of Place Order; <<extend>> means Apply Discount Code runs only conditionally, inserted into Place Order at an extension point when applicable
  4. D. They mean the same thing; <<extend>> and <<include>> are interchangeable notations

Correct answer: C. <<include>> means Validate Payment always runs as a mandatory part of Place Order; <<extend>> means Apply Discount Code runs only conditionally, inserted into Place Order at an extension point when applicable

<<include>> factors out mandatory, always-executed sub-behaviour (Place Order always validates payment). <<extend>> factors out optional behaviour that only sometimes applies (a discount code is applied only if the customer has one), inserted at a defined extension point.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic