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?
- A. <<include>> is conditional and <<extend>> is mandatory, the reverse of the usual convention
- B. <<extend>> means Place Order cannot run without Apply Discount Code first
- 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
- 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.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- A state machine diagram for an Order has states New, Paid and Shipped, with a transition from New to Paid labelled 'payment confirmed /…
- In a class diagram, Student has an association to Course with multiplicity 0.. on the Student side and 0.. on the Course side…
- An activity diagram shows a fork bar splitting one flow into two concurrent activities (ValidateAddress and ChargeCard), which later…
- A class diagram shows Shape as an abstract class with an italicized name and an italicized method + area(): double, and Circle, Square as…
- In a sequence diagram, a long thin rectangle drawn on top of a lifeline is called an activation bar (execution occurrence). What does its…
- A class diagram shows Employee with attribute - salary: double and operation + getSalary(): double. What do the leading - and + symbols…