Lecture 6 - Object Oriented Modelling and Use Cases
Lecture 6 - Object Oriented Modelling and Use Cases
Object oriented
modelling and use cases
11486 Systems Analysis and Modelling
6677 Systems Analysis and Modelling G
Dr Luke Nguyen-Hoan
This session will be recorded
Contents
Administration
1. Object oriented modelling
2. Use cases
3. Syntax and semantics
Textbook chapters:
4. Guidelines Systems Analysis and Design
Chapter 10 Object-Oriented Systems Analysis and Design Using UML* > Use Case Modeling
5. Use case descriptions UML@Classroom, An Introduction to Object-Oriented Modeling
Chapter 1 Introduction
6. Where are the objects? Chapter 3 The Use Case Diagram
All images under the Creative Commons Attribution licence or in the public domain unless otherwise stated
Administration
Computer problems
Image by Randall Munroe
https://xkcd.com/722/
Tutorials
Don’t forget that tutorials are assessed (1% each, best 10 or 11)
Assessment – Quiz 3 for UG students
The third quiz opens right after this lecture, and is due at 11:59pm on Sunday
Assessment – Assignment 2 - Group
This is due at the end of week 9
Generalisation
System boundary
Actors
Actors are users or user roles that exchange information with the system
Can be external systems as well
Outside the system boundary
Actor
Actors
Actors are users or user roles that exchange information with the system
Can be external systems as well
Outside the system boundary
Use case
Use cases describe how actors interact with the system
Each use case is a single interaction, capturing it from start to end
Use cases
Use case
Use case
Use cases describe how actors interact with the system
Each use case is a single interaction, capturing it from start to end Withdraw
Money
Relationships
Bank customer
This is one of those rare cases where you can have a line without a
label, but you might label it to clarify the role the actor plays in the
use case (particularly if a use case has multiple actors and roles)
Relationships
Includes and extends relationships are between use cases
<<extend>> <<extend>>
Relationships
Join
mailing list
Relationships - includes
Includes and extends relationships are between use cases
Includes relationships
are where a use case Submit Select <<include>>
explicitly incorporates order <<include>> product
the included use case
<<extend>> <<extend>>
Submit order includes
Select product Relationships
Join
Submit order may use mailing list
the functionality of
Select product
Select product can be included in multiple other use cases
Relationships - extends
Includes and extends relationships are between use cases
Extends relationships
are where there are Submit Select <<include>>
optional use case order <<include>> product
version(s) of a base use
case <<extend>> <<extend>>
Generalisation
Generalisation
New customer and Existing customer are
specialised versions of the generalised Bank
customer actor Bank customer
New customer and Existing customer inherit
behaviour and relationships from the Bank
customer actor
Generalisation
Generalisation
Withdraw money and Deposit money are Account
specialised versions of the generalised transaction
Account transaction use case
Withdraw money and Deposit money inherit
behaviour and relationships from the Account
transaction use case
Withdraw Deposit
money money
Generalisation
Generalisation
Specialised items such as Withdraw money Account
and Deposit money are also known as transaction
subtypes or child types (sub use case or child
use case in this example)
Generalised items such as Account transaction
are also known as supertypes or parent types
(super use case or parent use case) Withdraw Deposit
money money
Generalisation
System boundary
System boundary (like previous boundaries we’ve discussed) separates what’s inside
the ICT system with what is outside the ICT system
Where do each of these fit? Inside or outside the system boundary?
Use cases
Actors
Relationships
Generalisation
System boundary
Use case diagram notation
Use case
<includes>
Use case
<extends>
Actor
Relationships
Generalisation
System boundary
Putting it all together…
System boundary
Actors
Bank manager
New customer
Existing customer
Convention is that actors external to the organisation go on the left,
actors internal to the organisation go on the right, but this is only
Actors convention and not an actual rule.
Bank manager
New customer
Existing customer
List
Use cases
account
options
Change
Create Bank manager
account interest
rate
Create new
customer
New customer
Withdraw Deposit
money money
Existing customer
List
Relationships
account
options
Change
Create Bank manager
account interest
rate
Create new
customer
New customer
Withdraw Deposit
money money
Existing customer
List
Generalisation
account
options
Change
Create Bank manager
account interest
rate
Bank customer
Create new
customer
Account
transaction
New customer
Withdraw Deposit
money money
Existing customer
Includes and List
account
Extends options
Change
Create Bank manager
account interest
rate
Bank customer
<<include>>
Create new
customer
View
balance
Account
transaction
New customer <<extend>>
Withdraw Deposit
money money
Existing customer
Use case List
account
diagram options
Change
Create Bank manager
account interest
rate
Bank customer
<<include>>
Create new
customer
View
balance
Account
transaction
New customer <<extend>>
Withdraw Deposit
money money
Existing customer
Use case List
account
diagram options
Change
Create Bank manager
account interest
rate
Bank customer
<<include>>
Create new
customer Of course, you don’t have
View to strictly follow this order
balance
Account
transaction
Often, you will go back
New customer <<extend>>
and forth while identifying
actors, use cases,
relationships, and
Withdraw Deposit generalisations
money money
Existing customer
4. Guidelines
a) Level of abstraction
b) Techniques
Level of abstraction
Manage
account
Change Change
account interest
details rate
Select
account
Level of abstraction
Probably too high (too abstract) – who does this
Manage action, and what is involved? It’s not clear from the
account
name.
Change Change
account interest Probably about right – can be linked to specific
details rate actors