0% found this document useful (0 votes)
7 views

System Modeling

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

System Modeling

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

SOFTWARE

ENGINEERING
SYSTEM MODELING

Adapted from https://iansommerville.com/software-engineering-book/slides/


TOPICS COVERED

✓ Context models
✓ Interaction models
✓ Structural models
✓ Behavioral models
✓ Model-driven engineering

2
SYSTEM MODELING

✓ the process of developing abstract models of a


system
 each model presenting a different view or perspective
✓ means representing a system using some kind of
graphical notation
 almost always based on notations in the Unified Modeling
Language (UML).
✓ helps the analyst to
 understand the functionality of the system
 use models to communicate with customers.
Sep 2019 CHAPTER 5 SYSTEM MODELING 3
EXISTING AND PLANNED SYSTEM MODELS

✓ Models of the existing system


 used during requirements engineering.
 They help clarify what the existing system does and can
be used as a basis for discussing its strengths and
weaknesses.
 These then lead to requirements for the new system.
✓ Models of the new system
 used during requirements engineering to help explain the
proposed requirements to other system stakeholders.
 Engineers use these models to discuss design proposals
and to document the system for implementation.
Sep 2019 CHAPTER 5 SYSTEM MODELING 4
SYSTEM PERSPECTIVES

✓ An external perspective
 models the context or environment of the system.
✓ An interaction perspective
 models the interactions between a system and its
environment, or between the components of a system.
✓ A structural perspective
 models the organization of a system or the structure of the
data that is processed by the system.
✓ A behavioral perspective
 models the dynamic behavior of the system and how it
responds to events.
Sep 2019 CHAPTER 5 SYSTEM MODELING 5
USE OF GRAPHICAL MODELS

✓ As a means of facilitating discussion about an


existing or proposed system
 may be incomplete
✓ As a way of documenting an existing system
 should be an accurate representation of the system
✓ As a detailed system description that can be used
to generate a system implementation
 Models have to be both correct and complete.

Sep 2019 CHAPTER 5 SYSTEM MODELING 6


UML DIAGRAM TYPES

✓ Activity diagrams, which show the activities involved in


a process or in data processing .
✓ Use case diagrams, which show the interactions
between a system and its environment.
✓ Sequence diagrams, which show interactions between
actors and the system and between system
components.
✓ Class diagrams, which show the object classes in the
system and the associations between these classes.
✓ State diagrams, which show how the system reacts to
internal and external events.
Sep 2019 CHAPTER 5 SYSTEM MODELING 7
EXTERNAL PERSPECTIVES

Sep 2019 8
CONTEXT MODELS

✓ To illustrate the operational context of a system –


the boundaries
 they show what lies outside the system boundaries.

✓ Social and organisational concerns may affect the


decision on where to position system boundaries.
✓ Architectural models show the system and its
relationship with other systems.

Sep 2019 CHAPTER 5 SYSTEM MODELING 9


SYSTEM BOUNDARIES

✓ System boundaries are established to define what is


inside and what is outside the system.
 They show other systems that are used or depend on the
system being developed.

10
THE CONTEXT OF THE MENTCARE SYSTEM

11
PROCESS PERSPECTIVE

 Context models simply show the other systems in the environment, not how
the system being developed is used in that environment.

✓ Process models reveal how the system being


developed is used in broader business processes.

✓ UML activity diagrams may be used to define


business process models.

12
PROCESS MODEL OF INVOLUNTARY DETENTION

our system
13
INTERACTION PERSPECTIVES

Sep 2019 14
INTERACTION MODELS

✓ Modeling user interaction


 helps to identify user requirements.
✓ Modeling system-to-system interaction
 highlights the communication problems that may arise.
✓ Modeling component interaction
 to understand if a proposed system structure is likely to
deliver the required system performance and dependability.

✓ Use case diagrams and sequence diagrams may be


used for interaction modeling.

Sep 2019 CHAPTER 5 SYSTEM MODELING 15


USE CASE MODELING

 Use cases were developed originally to support requirements elicitation and


now incorporated into the UML.

✓ Each use case represents a discrete task that


involves external interaction with a system.
✓ Actors in a use case may be people or other
systems.
✓ Represented diagrammatically to provide an
overview of the use case and in a more detailed
textual form.
http://tynerblain.com/blog/2007/01/22/how-to-write-good-use-case-names/
Sep 2019 CHAPTER 5 SYSTEM MODELING 16
TRANSFER-DATA USE CASE

✓ A use case in the Mentcare system

17
TABULAR DESCRIPTION OF THE ‘TRANSFER DATA’
USE-CASE

MHC-PMS: Transfer data


Actors Medical receptionist, patient records system (PRS)
Description A receptionist may transfer data from the Mentcase system
to a general patient record database that is maintained by a
health authority. The information transferred may either be
updated personal information (address, phone number, etc.)
or a summary of the patient’s diagnosis and treatment.
Data Patient’s personal information, treatment summary
Stimulus User command issued by medical receptionist
Response Confirmation that PRS has been updated
Comments The receptionist must have appropriate security permissions
to access the patient information and the PRS.

Sep 2019 CHAPTER 5 SYSTEM MODELING 18


USE CASES IN THE MENTCARE SYSTEM INVOLVING
THE ROLE ‘MEDICAL RECEPTIONIST’

19
Use Case ID:

Use Case Name:


Created By: Last Updated By:

Date Created: Date Last Updated:


Actors:
Description:
Trigger:
Preconditions:
Postconditions:
Normal Flow: 1. …
2. …
Alternative Flows: Alternative 1:

Alternative x:

Exceptions: Exception 1:

Exception x:

Notes and Issues: 20
A USE-CASE EXAMPLE
Use-case Search club events
name
Actor A member of the public (MP)
Description The MP is searching for club events on a particular date.
Preconditions The MP is at the university home page.
Normal Flow 1. MP selects “Search Events” on MP home page
2. System presents a page with choice of dates for the
current month
3. MP selects a date from among the choices
4. System presents a page with events for that date,
giving time and club name
5. MP selects an event
6. System presents a page with details of that event,
including location, description and cost
Exceptions Exception 1: at step 4
4a. If there are no events for the selected date, System
presents a page saying that there are no events for the
selected date
Alternative Alternative 1: at step 3 21
MORE USE-CASE ANNOTATION

use-case extended point: when/where to extend


actor generalization: similar to class generalization

A - - «includes» - -> B: start at A, may do B, end at A


A <- - «extend» - - B: start at A, may do B (at an extended point) and (may) end at B
Sep 2019 22
SEQUENCE DIAGRAMS
 Sequence diagrams are part of the UML

✓ used to model the interactions between the actors


and the objects within a system.
✓ A sequence diagram shows the sequence of
interactions that take place during a particular use
case or use case instance.
 The objects and actors involved are listed along the top
of the diagram, with a dotted line drawn vertically from
these.
 Interactions between objects are indicated by annotated
arrows.
http://creately.com/blog/diagrams/sequence-diagram-tutorial/ CHAPTER 5 SYSTEM MODELING 23
SEQUENCE DIAGRAM FOR VIEW PATIENT
INFORMATION

24
Sep 2019 CHAPTER 5 SYSTEM MODELING 25
ANOTHER SEQUENCE DIAGRAM

26
IN-CLASS ACTIVITY

✓ Use-case and sequence diagrams for some


examples

✓ Note:
 1. If in seq. diagram A ---- method1(xxx) ----> B,
then “method1” is of A or B?

Sep 2019 CHAPTER 5 SYSTEM MODELING 27


STRUCTURAL PERSPECTIVES

Sep 2019 CHAPTER 5 SYSTEM MODELING 28


STRUCTURAL MODELS

✓ Display the organization of a system in terms of the


components that make up that system and their
relationships.
✓ Structural models may be
 static models: show the structure of the system design,
 or dynamic models: show the organization of the system
when it is executing.

Create structural models of a system when


discussing and designing the system
architecture.

Sep 2019 CHAPTER 5 SYSTEM MODELING 29


CLASS DIAGRAMS

✓ Used when developing an object-oriented system


model to show the classes in a system and the
associations between these classes.

 An object class can be thought of as a general definition


of one kind of system object.
 An association is a link between classes that indicates
that there is some relationship between these classes.

Sep 2019 CHAPTER 5 SYSTEM MODELING 30


UML CLASSES AND ASSOCIATION

Sep 2019 31
CLASSES AND ASSOCIATIONS IN THE MENTCARE

This is just Entity classes.


There are more for
Views/Boundaries and
Business processes/Controls

32
THE CONSULTATION CLASS

33
GENERALIZATION
 Rather than learn the detailed
characteristics of every entity, place these
entities in more general classes (animals,
cars, houses, etc.) and learn the
characteristics of these classes

34
A GENERALIZATION HIERARCHY WITH ADDED DETAIL

35
OBJECT CLASS AGGREGATION MODELS

✓ An aggregation model shows how classes that are


collections are composed of other classes.
 Aggregation models are similar to the part-of relationship in semantic data
models.

36
AGGREGATION VS COMPOSITION RELATIONSHIP

✓ Aggregation: specifies a whole/part relationship


between the aggregate (whole) and component part
(the component may survive the aggregate object)
✓ Composition: composite object takes ownership of
the component(s)

37
DATABASE DIAGRAMS VS CLASS DIAGRAMS

✓ Entity/Relation/Table vs. class


✓ Entity/Relation/Table relationship vs class
relationship

✓ When and why we need


 Only database
 Only classes
 Both
Sep 2019 CHAPTER 5 SYSTEM MODELING 38
BEHAVIORAL PERSPECTIVES

Sep 2019 CHAPTER 5 SYSTEM MODELING 39


BEHAVIORAL MODELS

✓ Behavioral models are models of the dynamic


behavior of a system as it is executing.
 They show what happens or what is supposed to happen
when a system responds to a stimulus from its
environment.

✓ Stimuli:
 Data: Some data arrives that has to be processed by the
system.
 Events: Some event happens that triggers system
processing. Events may have associated data, although
Sep 2019 CHAPTER 5 SYSTEM MODELING 40
DATA-DRIVEN MODELING

 Many business systems are data-processing systems that are primarily driven
by data. They are controlled by the data input to the system, with relatively
little external event processing.

✓ Data-driven models show the sequence of actions


involved in processing input data and generating an
associated output.

✓ Data-Flow-Diagrams ( DFD) ?
 Not UML
Sep 2019 CHAPTER 5 SYSTEM MODELING 41

You might also like