← VCE Software Development U3O2

Use case relationships: includes and extends

<<include>>: a use case always uses another (arrow points to the included one). <<extend>>: optionally adds behaviour (arrow points from the extending case to the base).

Understanding Use case relationships: includes and extends in VCE Software Development U3O2

What it does: Scanning the library card happens every time a book is borrowed, so it is an <<include>> and the arrow points to the included use case. Optional behaviour that is added only sometimes is shown with <<extend>>.

Common mistakes: Logging in always happens when an order is placed, so it must be <<include>>, not <<extend>>. <<extend>> is only for optional behaviour. For <<include>> the arrow points from the base use case to the included one. It should be Order ..> Pay <<include>>.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 42–51) and word search (Modules 26–51).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
In an online shop, 'Make Payment' must always run 'Validate Card'. Which relationship links them?
<<extend>><<include>>
Matches
Withdraw Cash - - <<extend>> - -> Enter PIN
↓
Entering a PIN always happens when withdrawing cash, so it should be <<include>>, not <<extend>>.
Applying
Meanings
Term
<<include>> vs <<extend>>
Meaning
<<include>>: a use case always uses another (arrow points to the included one). <<extend>>: optionally adds behaviour (arrow points from the extending case to the base).
Practice
(Place Order) ..> (Verify Payment) : <<include>>
Testing
Gaps
Checkout --> Login : <<>>
Check Answer
Spots
2Order ..> Pay <<include>>
3Order ..> Login <<extend>>

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Star Fox' badge — Frozen Master, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. In an online shop, 'Make Payment' must always run 'Validate Card'. Which relationship links them?
A. <<include>> ✓
B. <<extend>>
Validate Card happens every time Make Payment runs, so it is an <<include>> relationship.
2. 'Add Gift Message' only happens if the customer chooses it while placing an order. Which relationship is this?
A. <<extend>> ✓
B. <<include>>
Optional behaviour that is added only sometimes is shown with <<extend>>.
3. For an <<include>> relationship, which way does the arrow point?
A. From the included use case to the base use case
B. From the base use case to the included use case ✓
The base use case 'calls' the included one, so the arrow points to the included use case.
4. For an <<extend>> relationship, which way does the arrow point?
A. From the extending use case to the base use case ✓
B. From the base use case to the extending use case
The optional extending use case adds to the base, so the arrow points to the base use case.
5. Which statement about an included use case is true?
A. It runs only when the user chooses it
B. It runs every time the base use case runs ✓
<<include>> means always. Optional behaviour is what <<extend>> is for.

Match the Pairs

Checkout - - <<include>> - -> Verify Card → Checkout always uses Verify Card, and the arrow points to the included use case.
Apply Discount - - <<extend>> - -> Checkout → Apply Discount optionally adds behaviour to Checkout, and the arrow points to the base use case.
A base use case that always needs another use case to finish uses an include relationship → Borrow Book - - <<include>> - -> Scan Library Card
An optional extra step uses an extend relationship, with the arrow pointing from the extra step to the base → Add Gift Wrap - - <<extend>> - -> Place Order
Withdraw Cash - - <<extend>> - -> Enter PIN → Entering a PIN always happens when withdrawing cash, so it should be <<include>>, not <<extend>>.
Pay Fees - - <<extend>> - -> Download Receipt → The arrow points the wrong way. An extend arrow must point from Download Receipt (the optional extension) to the base use case, Pay Fees.

Key Term

<<include>> vs <<extend>>
<<include>>: a use case always uses another (arrow points to the included one). <<extend>>: optionally adds behaviour (arrow points from the extending case to the base).

Fill in the Blanks

1. # Every checkout needs a login Checkout --> Login : <<include>>
Hint: Type the keyword for a relationship where the other use case always runs.
2. # A coupon is optional at checkout Apply Coupon --> Checkout : <<extend>>
Hint: Type the keyword for a relationship that optionally adds behaviour to a base use case.
3. Base: Book Flight Optional: Add Meal Add Meal --> Book Flight : <<extend>>
Hint: Type the base use case, which is where an extend arrow points.
4. Included: Log In Place Order --> Log In : <<include>>
Hint: Type the use case being included, which is where an include arrow points.
5. # Making a sale always checks stock Make Sale --> Check Stock : <<include>>
Hint: Type the base use case, which is where an include arrow starts.

Spot the Error

Question 1
A Actor: Customer
B Order ..> Pay <<include>>
C Order ..> Login <<extend>>
Line C — Logging in always happens when an order is placed, so it must be <<include>>, not <<extend>>. <<extend>> is only for optional behaviour.
Question 2
A Pay ..> Order <<include>>
B Order ..> Login <<include>>
C Actor: Customer
Line A — For <<include>> the arrow points from the base use case to the included one. It should be Order ..> Pay <<include>>.
Question 3
A Actor: Shopper
B Checkout ..> Gift <<extend>>
C Checkout ..> Pay <<include>>
Line B — For <<extend>> the arrow points from the extending (optional) use case to the base use case. It should be Gift ..> Checkout <<extend>>.
Question 4
A Actor: Member
B Borrow ..> Login <<include>>
C Return ..> Scan <<include>>
D Fine ..> Return <<include>>
Line D — A fine is only charged when a book is late, so it is optional behaviour. It should be <<extend>>, not <<include>>.
Question 5
A Actor: Customer
B Receipt ..> Buy <<extends>>
C Buy ..> Pay <<include>>
Line B — The stereotype is spelled <<extend>>, not <<extends>>.

Student with a class code? Join your class →