Lecture 09_System Modeling
Lecture 09_System Modeling
1
Topics covered
Context models
Interaction models
Structural models
2
Context models
3
System modeling
4
Context models
5
System boundaries
6
The context of the Mentcare system
7
Interaction models
8
UML diagram types
9
Use case modeling
10
Definition
11
What is it?
12
Use Cases
• What is an Actor?
A user or outside system that interacts with the system
being designed in order to obtain some value from that
interaction
An Actor is outside or external the system.
It can be a:
Human
Peripheral device (hardware)
External system or subsystem
Time or time-based event
Represented by stick figure 16
Use Cases
The picture below is a Make Appointment use case for the medical
clinic.
The actor is a Patient. The connection between actor and use case
is a communication association (or communication for short).
Actors are stick figures. Use cases are ovals. Communications are lines that link
actors to use cases.
Use Case Components
24
Scenario
Example:
A patient calls the clinic to make an appointment for a
yearly checkup. The receptionist finds the nearest empty
time slot in the appointment book and schedules the
appointment for that time slot.
25
Use Case
Represented by an oval
26
Use Case - Actor
27
Use Case - Relationships
Relationships
28
Use Case - Relationships
Boundary
• A boundary rectangle is placed around the perimeter of
the system to show how the actors communicate with the
system.
29
Use-Case Diagram
• Generalization
• Include
• Extend
31
Components of Use Case Diagram
Generalization Relationship
• Represented by a line and a hollow arrow
• From child to parent
32
33
Use Case Diagram
Include Relationship:
• Represents the inclusion of the functionality of one use
case within another
• Arrow is drawn from the base use case to the used use
case
34
Use Case Diagram
Extend relationship:
35
Example of Relationships
36
Why Use Cases?
37
Transfer-data use case
38
Tabular description of the ‘Transfer data’ use-
case
39
Use cases in the Mentcare system involving the
role ‘Medical Receptionist’
40
Assignment#2: (1) Draw a use case diagram for
describing the functional requirements of the following
system.
Consider an online reservation system for a bus company. The bus company
includes several buses and realizes trips to different cities. Each bus is
identified by its plate number and a separately assigned bus number. The trips
are based on a predefined schedule and stop at predefined bus stations. Each
bus can have only one trip per day. Each bus includes a driver and one hostess.
For long trips, the bus will have breaks at service and rest areas. There are two
types of trips, normal trips and express trips. Express trips do not stop at
intermediate stations and get faster at the destination.
Seats can be reserved by customers on the web site of the bus company. The
customer has the option to directly pay for the seat through the website. In that
case, the seat cannot be cancelled (neither by the customer nor by the bus
company). If the customer has not paid for the seat, the bus company can
cancel the seat if the customer does not show up one hour before the trip.
When the reservation is cancelled, the seat will become free and can be sold to
another customer. Both the customer and the company staff must authenticate
themselves for performing operations with the system.
41
Assignment#2: (2) Create a use case diagram
42
Sequence diagrams
43
Sequence diagrams
45
Example: Online Shopping
In order to develop our sequence diagram we will need the use case text
and the specification class diagram:
Use Case Text: Buy a Product Online
1. Customer browses through catalog and selects items to buy.
2. Customer goes to checkout.
3. Customer fills out shipping information.
4. System presents full pricing information, including shipping information.
5. Customer fills in credit card information.
6. System authorizes purchase.
7. System confirms sale immediately.
8. System sends confirming email to customer.
46
Sequence diagram
47
Sequence diagram for View patient information
48
Sequence
diagram for
Transfer Data
49
Structural models
50
Structural models
51
Class diagrams
53
UML classes and association
54
Classes and associations in the MHC-PMS
55
The Consultation class
56
Generalization
57
Generalization
59
A generalization hierarchy with added detail
60
Object class aggregation models
61
The aggregation association
62
Key points
63