---
title: "Functional vs non-functional; include and extend"
subject: "Object Oriented Analysis and Design"
chapter: 2
key: "semester_6/object_oriented_analysis_and_design:functional-nonfunctional-include-extend"
source: https://www.bctengineer.com/q/semester_6/object_oriented_analysis_and_design/functional-nonfunctional-include-extend
site: BCT Engineering
---

# Functional vs non-functional; include and extend

Object Oriented Analysis and Design · Chapter 2: Object Oriented Analysis

- Asked in: 2072 Asoj, 5 marks
- Video: [UML use case diagrams: Everything you need to know](https://www.youtube.com/watch?v=4emxjxonNRI) — Lucid Software
- Answer checked by Claude Sonnet 5.5 on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/object_oriented_analysis_and_design/functional-nonfunctional-include-extend
- Whole chapter: https://www.bctengineer.com/md/semester_6/object_oriented_analysis_and_design/chapter-2

## Question

Differentiate between functional and non-functional requirement. What are the relationships in Use Case Diagrams and explain <<include>> and <<extend>> relationships with diagram?

## Short answer

Functional requirements define what the system does, non-functional define quality constraints like speed and security. The <<include>> relationship is mandatory: base use case always calls included one, arrow points base→included. The <<extend>> relationship is optional: extending use case adds behavior under a condition, arrow points extending→base.

## Answer

#### Functional vs non-functional requirements

| Point | Functional | Non-functional |
|---|---|---|
| Meaning | What the system must **do** (functions, services) | How well the system does it (quality, constraints) |
| Describes | Features, inputs, processing, outputs | Performance, security, usability, reliability, portability |
| Verification | By functional testing against use cases | By measuring (load test, security test) |
| Documented as | Use cases, user stories | Supplementary specification |
| Example | "The system shall let a user withdraw cash" | "Withdrawal must complete within 5 seconds" |

#### Relationships in a use case diagram
1. **Association:** line between an actor and a use case.
2. **Generalization:** between actors (or between use cases): specialised one inherits the behaviour.
3. **Include:** one use case always uses another.
4. **Extend:** one use case optionally adds behaviour to another under a condition.

#### `<<include>>`
The base use case **always** calls the included use case, which is the common behaviour shared by several use cases. Arrow points from base to the included one. Used to avoid repetition.

#### `<<extend>>`
The extending use case **optionally** adds behaviour to the base use case when a condition (extension point) is true. Arrow points from the extending to the base use case.

```text
 [Customer]--( Withdraw Cash )--<<include>>-->( Verify PIN )
                    ^
                    | <<extend>>  [balance low]
             ( Show Low Balance Warning )
```

| `<<include>>` | `<<extend>>` |
|---|---|
| mandatory, always runs | optional, conditional |
| arrow base -> included | arrow extension -> base |
| base is incomplete without it | base is complete without it |

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which statement is a non-functional requirement?
   A. The system shall let a user withdraw cash
   B. The system shall print a receipt
   C. Withdrawal must complete within 5 seconds
   D. The system shall list accounts
   Answer: C. Non-functional requirements state how well the system works (performance, security, usability), not what it does. (Key point: Functional vs non-functional)

2. Which is the complete list of use case diagram relationships?
   A. Aggregation, composition, dependency
   B. Association, generalization, include, extend
   C. Message, return, self-call
   D. Fork, join, merge
   Answer: B. Use case diagrams use association, generalization, include and extend. (Key point: Relationships in use case diagrams)

3. What is true of <<include>>?
   A. It is optional and conditional
   B. The arrow points from the included case to the base
   C. The base is complete without it
   D. The base always uses the included use case, and the arrow points from base to included
   Answer: D. Include is mandatory common behaviour; the base is incomplete without it. (Key point: <<include>>)

4. What is true of <<extend>>?
   A. The extending use case adds behaviour optionally when a condition holds; arrow points to the base
   B. It always runs
   C. The arrow points from base to extension
   D. It is used to avoid repetition of mandatory steps
   Answer: A. Extend is optional and conditional (extension point); the arrow goes from the extension to the base. (Key point: <<extend>>)

## Related in Object Oriented Analysis and Design

- [Coffee vending machine use case diagram](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Acoffee-vending-machine-use-case) — Object Oriented Analysis and Design, chapter 2
- [Importance of use case diagram](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Ause-case-diagram-importance-uml) — Object Oriented Analysis and Design, chapter 2
- [Collaboration and use case diagram case](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Apopulation-system-collaboration-usecase) — Object Oriented Analysis and Design, chapter 2
- [Math Training Institute use case diagram](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Amath-training-institute-use-case) — Object Oriented Analysis and Design, chapter 2
- [Requirement elicitation and system behavior](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Arequirement-elicitation-in-ooa) — Object Oriented Analysis and Design, chapter 2
- [Video rental shop class diagram](https://www.bctengineer.com/question.md?key=semester_6%2Fobject_oriented_analysis_and_design%3Avideo-rental-class-diagram) — Object Oriented Analysis and Design, chapter 2

## Related in other subjects

- [Functional versus non-functional requirements](https://www.bctengineer.com/question.md?key=semester_5%2Fsoftware_engineering%3Afunctional-nonfunctional) — Software Engineering, chapter 1
- [Functional block diagram of excitation control](https://www.bctengineer.com/question.md?key=semester_7%2Fpower_plant_equipment%3Aexcitation-control-block-diagram) — Power Plant Equipment, chapter 3
- [Analog and digital system block diagrams; linear and non-linear distortion](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Aanalog-digital-block-linear-nonlinear-distortion) — Communication Systems, chapter 1
- [Case study: existing vs proposed system](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Acs-2074asoj) — Instrumentation II, chapter 10
