SET212: Software Engineering (2)
System Models
Topics covered
Behavioural models (State machine models)
Data models
Object models
CASE workbenches
State machine models
These model the behaviour of the system in response to
external and internal events.
They show the system responses to stimuli so are often
used for modelling real-time systems.
State machine models show system states as nodes and
events as arcs between these nodes. 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.
Statecharts
Allow the decomposition of a model into sub-
models.
A brief description of the actions is included
following the ‘do’ in each state.
Can be complemented by tables describing the
states and the stimuli.
Microwave oven model
Microwave oven state description
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 oven power is set to 600 watts. The display shows ‘Full power’.
Set time The cooking time is set to the user’s 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 oven 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.
Microwave oven stimuli
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 switch 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
Microwave oven operation
Semantic data models
Semantic data models describe the logical structure of
data which is (imported to or exported) processed by the
systems.
An Entity-Relationship (E-R) model defines the entities in
the system, the relationships between these entities and
the entity attributes. E-R diagram is used to describe this
model.
Widely used in database design. Can readily be
implemented using relational databases.
UML can also be used to describe this model.
E-R Diagram for a University
Enterprise
Library semantic Data model (UML)
ER vs. UML Class Diagrams
ER vs. UML Class Diagrams
ER vs. UML Class Diagrams
ER Diagram Notation Equivalent in UML
Data dictionaries
Data dictionaries are lists of all of the names used in the
system models. Descriptions of the entities, relationships
and attributes are also included.
Advantages
• Support name management and avoid duplication;
• Store of organisational knowledge linking analysis, design and
implementation;
Many CASE workbenches support data dictionaries.
Data dictionary entries
Name Description Type Date
Details of the published article that may be ordered by
Article Entity 30.12.2002
people using LIBSYS.
The names of the authors of the article who may be due
authors Attribute 30.12.2002
a share of the fee.
The person or organisation that orders a co py of the
Buyer Entity 30.12.2002
article.
A 1:1 relationship between Article and the Copyright
fee- Relation 29.12.2002
Agency who should be paid the copyright fee.
payable-to
The address of the buyer. This is used to any paper
Address Attribute 31.12.2002
billing information that is required.
(Buyer)