System_modelling
System_modelling
System Modelling
System modelling is the process of developing abstract models of a system, with each
model presenting a different view or perspective of that system.
System modelling has generally come to mean representing the system using some
kind of graphical notation, which is now almost always based on notations in the
Unified Modelling Language (UML).
System modelling helps the analyst to understand the functionality of the system and
models are used to communicate with customers.
You may develop different models to represent the system from different
perspectives. For example:
1. An external perspective, where the context or environment of the system is
modelled
2. A behavioral perspective, where the behaviour of the system is modelled
3. A structural perspective, where the architecture of the system or the
structure of the data processed by the system is modelled.
Examples of the Types of System Models that you might create during the analysis process
are:
1. Activity diagrams: which show the activities involved in a process or in data
processing.
2. Use case diagrams: which show the interactions between a system and its
environment.
3. Sequence diagrams: which show interactions between actors and the system and
between system components.
4. Class diagrams: which show the object classes in the system and the associations
between these classes.
5. State diagrams: which show how the system reacts to internal and external events.
1|Page
Software Engineering Unit 2: System Modeling
1. Context Models
You should decide on the system boundaries. This involves working with system
stakeholders to decide what functionality should be included in the system and what
is provided by the system’s environment.
Once some decisions on the boundaries of the system have been made, part of the
analysis activity is the definition of that context and the dependencies that a system
has on its environment. Normally, producing a simple architectural models the first
step in this activity.
A context model is a simple diagram that shows how a system interacts with other
systems and the environment around it. It helps visualize which systems are
connected and share data, without getting into too much detail about how they
connect.
Example: Mental Health Care - Patient Management System (MHC-PMS)
Let’s take an example of a Patient information system for mental health care (called
MHC-PMS). The system handles information about patients and their treatments. In
its environment, there are several other systems it interacts with:
2|Page
Software Engineering Unit 2: System Modeling
3|Page
Software Engineering Unit 2: System Modeling
2. Interaction models
All systems involve interaction of some kind. This can be user interaction, which
involves user inputs and outputs, interaction between the system being developed
and other systems or interaction between the components of the system.
There are Two approaches to interaction modeling:
1. Use case modelling, which is mostly used to model interactions between a
system and external actors (users or other systems).
2. Sequence diagrams, which are used to model interactions between system
components, although external agents may also be included.
Example Use Case: An example from the MHC-PMS is the task of uploading data to a
general patient record system, which holds summary data about patients.
Notice that there are two actors in this use case: the operator who is transferring the
data and the patient record system.
The stick figure notation was originally developed to cover human interaction but it is
also now used to represent other external systems and hardware.
Use case diagrams use lines without arrows to show interactions because arrows
indicate the direction of message flow, which isn't applicable in use cases where
messages go both ways.
4|Page
Software Engineering Unit 2: System Modeling
The informal arrows in the example indicate that the medical receptionist starts the
transaction, and data flows to the patient record system.
Use case diagrams provide a simple overview, but more detail is needed to
understand the interaction fully.
5|Page
Software Engineering Unit 2: System Modeling
6|Page
Software Engineering Unit 2: System Modeling
3. Structural models
Structural models of software 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, which show the structure of the system
design or dynamic models, which show the organization of the system when it is
executing.
In this case, the Patient class defines a template for patients, and the Patient Record
class defines a template for patient records.
An association is a link between the Patient class and the Patient Record class,
showing that there is a relationship between them. For example, a Patient is
associated with their Patient Record, meaning the patient has a record in the system.
This relationship suggests that both classes may need to interact or know about each
other. For instance, the Patient class may access information from the Patient Record
class to manage and view the patient's medical history.
In this example, the Patient class and the Patient Record class have a 1:1
relationship, meaning: that there is a 1:1 relationship between objects of these
classes.
That is, each patient has exactly one record and each record maintains information
about exactly one patient.
7|Page
Software Engineering Unit 2: System Modeling
This type of class diagram to show that objects of class Patient are also involved in
relationships with a number of other classes.
Class diagrams look similar to semantic data models used in database design, which
show:
8|Page
Software Engineering Unit 2: System Modeling
In the UML, you show attributes and operations by extending the simple rectangle
that represents a class. This is illustrated in Figure 5.10 where:
1. The name of the object class is in the top section.
2. The class attributes are in the middle section. This must include the attribute
names and, optionally, their types.
3. The operations (called methods in Java and other OO programming languages)
associated with the object class are in the lower section of the rectangle.
3.2. Generalization
Generalization helps us organize and simplify complex information.
Generalization is an everyday technique that we use to manage complexity. Rather
than learn the detailed characteristics of every entity that we experience, we place
these entities in more general classes (animals, cars, houses, etc.) and learn the
characteristics of these classes.
This allows us to infer that different members of these classes have some common
characteristics (e.g., squirrels and rats are rodents). We can make general statements
that apply to all class members (e.g., all rodents have teeth for gnawing).
In simple, It’s a way to group related classes together based on common traits.
This shows that general practitioners and hospital doctors can be generalized as
doctors and that there are three types of Hospital Doctor— those that have just
graduated from medical school and have to be supervised (Trainee Doctor)
9|Page
Software Engineering Unit 2: System Modeling
These lower-level classes then add more specific attributes and operations. For
example, all doctors have a name and phone number; all hospital doctors have a staff
number and a department but general practitioners don’t have these attributes as
they work independently
in Figure 5.12, which shows part of the generalization hierarchy that I have extended
with class attributes. The operations associated with the class Doctor are intended to
register and de-register that doctor with the MHC-PMS
10 | P a g e
Software Engineering Unit 2: System Modeling
3.3 Aggregation
Objects in the real world are often composed of different parts. For example, a study
pack for a course may be composed of a book, PowerPoint slides, quizzes, and
recommendations for further reading.
In UML (Unified Modeling Language), aggregation shows how objects relate to each
other. One object (the "whole") contains other objects (the "parts"). To represent
this, we draw a line between the objects, and a diamond shape near the object that
represents the whole.
To show this, we use a diamond shape next to the class that represents the whole.
This is shown in Figure 5.13, which shows that a patient record is a composition of
Patient and an indefinite number of Consultations.
11 | P a g e
Software Engineering Unit 2: System Modeling
4. Behavioral models
Behavioral models are ways to understand how a system works while it’s running.
They help us see what happens when the system reacts to things happening around
it.
Behavioral models are models of the dynamic behavior of the 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. You can think of these stimuli as being
of two types:
1. Data Some data arrives that has to be processed by the system.
2. Events Some event happens that triggers system processing. Events may have
associated data but this is not always the case.
12 | P a g e
Software Engineering Unit 2: System Modeling
You have seen how these can be used to model interaction but, if you draw these so
that messages are only sent from left to right, then they show the sequential data
processing in the system.
Figure 5.15 illustrates this, using a sequence model of the processing of an order and
sending it to a supplier. Sequence models highlight objects in a system, whereas
data-flow diagrams highlight the functions.
13 | P a g e
Software Engineering Unit 2: System Modeling
14 | P a g e
Software Engineering Unit 2: System Modeling
For safety reasons, the oven should not operate when the door is open and, on
completion of cooking, a buzzer is sounded. The oven has a very simple
alphanumeric display that is used to display various alerts and warning messages
In UML state diagrams, rounded rectangles represent system states. They may
include a brief description (following ‘do’) of the actions taken in that state. The
labeled arrows represent stimuli that force a transition from one state to another.
You can indicate start and end states using filled circles, as in activity diagrams.
Figure 5.17, which shows a tabular description of each state and how the stimuli that
force state transitions are generated
15 | P a g e
Software Engineering Unit 2: System Modeling
16 | P a g e
Software Engineering Unit 2: System Modeling
If a software system is intended to run on different platforms (e.g., J2EE and .NET),
then it is only necessary to maintain the PIM. The PSMs for each platform are
automatically generated. This is illustrated in Figure 5.20.
Although MDA-support tools include platform-specific translators, it is often the case
that these will only offer partial support for the translation from PIMs to PSMs.
17 | P a g e
Software Engineering Unit 2: System Modeling
18 | P a g e
Software Engineering Unit 2: System Modeling
Assignment Questions
2 Marks Questions
1. Define System Modeling
2. List out the types of system models
3. Define Sequence and Use case model
4. Write full form of DFD, CIM, PIM, PSM, UML
5. Define Structural model
6. Define Class diagram
5 Marks Questions
1. Explain Context Model
2. Explain Class diagrams
3. Explain Generalization and Aggregation
4. Explain Model Driven Engineering
5. Explain Executable UML
6. Explain Interaction model and its types
10 Marks Questions
1. Explain in detail about Model driven Architecture
2. Explain Data driven modelling
3. Explain Event driven modelling
19 | P a g e