Lec07 - System Modeling
Lec07 - System Modeling
(vthnhan@vnu.edu.vn)
Interaction models
Structural models
Behavioral models
Model-driven engineering
They help clarify what the existing system does and can be used as a basis
for discussing its strengths and weakness
Engineers use these models to discuss design proposals & to document the
system for implementation
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
Architectural models show the system and its relationship with other
systems
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
The position of the system boundary has a profound effect on the system
requirements
‘s
Tranfer data
Description A receptionist may transfer data from the Mentcare 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
Use cases in the Mentcare system involving the role ‘Medical Receptionist’
The objects and actors involved are listed along the top of the diagram,
with a dotted line drawn vertically from these
You create structural models of a system when you are discussing and
designing the system architecture
When you are developing models during the early stages of the
software engineering process, objects represent something in the real
world, such as a patient, a prescription, doctor, etc.
This allows us to infer that different members of these classes have some
common characteristics, e.g., squirrels and rats are rodents
if changes are proposed, then you don’t have to look at all classes in the
system to see if they are affected by the change
The lower-level classes are subclasses that inherit the attributes and
operations from their superclasses
These lower-level classes then add more specific attributes and operations
Events: some event happens that triggers system processing. Events may have
associated data, although this is not always the case
Data-driven modeling
Many business systems are data-driven systems that are primarily driven
by data
They are controlled by the data input to the system, with relatively little
external event processing
Event-driven modeling
Real-time systems are often event-driven, with minimal data processing
They show the system’s responses to stimuli, so are often used for
modeling real-time systems
when an event occurs, the system moves from one state to another
Statecharts are an integral part of the UML and are used to represent state
machine models
State Description
Waiting The oven is waiting for input. The display shows the current time
Half power The oven power is set to 300 watts. The display shows ‘Half power’
Full power The over power is set to 600 watts. The display shows ‘Full power’
Set time The cooking time is set to the user’ input value. The display shows
the cooking time selected and is updated as the time is set
Disabled Oven operation is disabled for safety. Interior oven light is on. Display
shows ‘Not ready’
Enabled Oven operation is enabled. Interior light is off. Display shows ‘Ready
to cook’
Operation Oven in operation. Interior oven light is on. Display shows the timer
countdown. On completion of cooking, the buzzer is sounded for 5
seconds. Oven light is on. Display shows ‘cooking complete’ while
buzzer is sounding
Stimulus Description
Half power The user has pressed the half-power button
Full power The user has pressed the full-power button
Timer The user has pressed one of the timer buttons
Number The user has pressed a numeric key
Door open The oven door switches is not closed
Door closed The oven door switch is closed
Start The user has pressed the Start button
Cancel The user has pressed the Cancel button
Pros
Cons
However abstractions that are useful for discussions may not be the right
abstraction for implementation
For software products and information systems, the savings from the use of
MDA are likely to be outweighed by the costs of its introduction and tooling
The widespread adoption of agile methods over the same period that
MDA was evolving has diverted attention away from model-driven
approaches
Use case diagrams and sequence diagrams are used to describe the
interactions between users and systems in the system being designed
Class diagrams are used to define the static structure of classes and their
associations
This behavior can be modeled from the perspective of the data processed by
the system, or by the events that stimulate responses from a system
Activity diagrams may be used to model the processing of data, where each
activity represents one process step