Skip to main content

Functional vs non-functional; include and extend

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.

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

Functional vs non-functional requirements

PointFunctionalNon-functional
MeaningWhat the system must do (functions, services)How well the system does it (quality, constraints)
DescribesFeatures, inputs, processing, outputsPerformance, security, usability, reliability, portability
VerificationBy functional testing against use casesBy measuring (load test, security test)
Documented asUse cases, user storiesSupplementary 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.

 [Customer]--( Withdraw Cash )--<<include>>-->( Verify PIN )
                    ^
                    | <<extend>>  [balance low]
             ( Show Low Balance Warning )
<<include>><<extend>>
mandatory, always runsoptional, conditional
arrow base -> includedarrow extension -> base
base is incomplete without itbase is complete without it

✓ Answer checked by Claude Sonnet 5.5

All Object Oriented Analysis and Design chapter 2 questions →