Object Oriented Analysis
and Design
Instructor: Ekrem BAŞER, PhD
Contact:[email protected]
Use Case
• Defines a model of a system behaviour
• Uses natural language
• designers and programmers use as a common reference
• Decomposes large system specification into small, manageable parts
• Smaller parts are easily described, hence easily implemented
• Models functional behaviour of the system
Use Case Description
Gameplay
Mainflow
Alternate Flow
Use Case
• Describes a discrete unit of behaviour that has a clearly defined scope
• Illustrates what should be done to achieve the goal of the use case
• This ultimately maps into program code
• Shown as an oval shape with the description of the behaviour
Actor
• External entity that interacts with the system
• Could be a person, system or some external entity
• Maybe defined outside the system
• Acts as a black box and cannot be changed
• Appears as a stick figure
Communication Line
• Connects an actor and a use case
• Indicates participation of an actor
• Appears as a line between an actor & the use case
System Boundaries
• Indicates separation between actors and use cases (internal to the
system)
• Marked by a bounded box around the use cases
Example
Modelling Tools
• Enterprise Architect
• Microsoft Visio
• Star UML
• Papyrus
• Visual Paradigm
https://staruml.io/
Use Case Relationships
• Some use cases use similar steps in their behaviour
• Others may have different modes or special cases
• Depicting such uses cases may cause users to repeat them in the
diagrams
• This will lead to large and complicated diagrams
• UML provides different notations for representing these behaviours
<<include>> Relationship
• A use case may reuse all the steps from another use case
• it "includes" the steps from another use case
• This can be depicted through «include» relationship
• In diagram, shown as a dashed arrow between use cases with
«include» label
• tail end is towards the use case that reuses the steps
• arrow end points towards the use case that is reused
• Included use cases are mandatory and not optional
<<include>> Notation
Example <<include>>
Example <<include>>
Generalization
• Used to show that one use case is a type of another, but with some
changes
• Depicted through the generalization arrow
• Arrow head points to generalized use case
• Tail points to specialized use case
Generalization Notation
Example Generalization
Example Generalization
«extend» Relationship
•This is used to specify an optional behaviour
•This behaviour appears as an extended use case
• Independent of the main use case, but owned by it
• Shown as a dashed arrow with «extend» label
• Remember, this behaviour is optional
«extend» Notation
Example: «extend»
Example: «extend»
StarUML Implementation