Software Engineering-Unit 3 "System Modelling" by Adi.pdf

836 views 39 slides Jan 15, 2024
Slide 1
Slide 1 of 39
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39

About This Presentation

Software Engineering-Unit 3 "System Modelling" by Adi.ppt


Slide Content

SYSTEM MODELING
DR. K. ADISESHA

Software Engineering
Unit-3
Introduction
System Modelling
Context Models
Interaction Models
Model-Driven Engineering
2
SYSTEM MODELING
Dr. K. Adisesha

Introduction
Dr. K. Adisesha
3
System Modeling:
System modeling is the process of developing abstract models of a system, with each
model presenting a different view or perspective of that system.
➢System modeling has now come to mean representing a system using some kind of
graphical notation, which is now almost always based on notations in the Unified
Modeling Language (UML).
➢System modelling helps the analyst to understand the functionality of the system and
models are used to communicate with customers.
➢In a model-driven engineering process, it is possible to generate a complete or partial
system implementation from the system model.

Introduction
Dr. K. Adisesha
4
System Modeling:
System modeling is the process of developing abstract models of a system, with each
model presenting a different view or perspective of that system.
➢System modeling may represent a system using graphical notation, e.g. the Unified
Modeling Language (UML).

System Modeling
Dr. K. Adisesha
5
System Modeling:
System modeling is the process of developing abstract models of a system, with each
model presenting a different view or perspective of that system.
➢System perspectives: Models can explain the system from different perspectives:
❖External perspective: where you model the context or environment of the system.
❖Interaction perspective: where you model the interactions between a system and its
environment, or between the components of a system.
❖Structural perspective: where you model the organization of a system or the
structure of the data that is processed by the system.
❖Behavioral perspective: where you model the dynamic behavior of the system and
how it responds to events.

System Modeling
Dr. K. Adisesha
6
System Modeling:
Engineers use these models to discuss design proposals and to document the system for
implementation.
➢Use of graphical models: Five types of UML diagrams that are the most useful for
system modeling:
❖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.

System Modeling
Dr. K. Adisesha
7
System Modeling:
Engineers use these models to discuss design proposals and to document the system for
implementation.
➢Five types of UML diagrams that are the most useful for system modeling:
Activity diagrams Use case diagrams Sequence diagrams Class diagrams State diagrams

System Modeling
Dr. K. Adisesha
8
Activity diagrams using UML:
We use Activity Diagrams to illustrate the flow of control in a system and refer to the
steps involved in the execution of a use case.



Guards
Action Flow
Decision and Branching Fork
Initial State Notation Final State NotationAction or Activity State
Merge EventJoin
Time Event

System Modeling
Dr. K. Adisesha
9
Activity diagrams using UML:
We use Activity Diagrams to illustrate the flow of control in a system and refer to the
steps involved in the execution of a use case.
➢Initial State: The starting state before an activity takes place is depicted using the initial state.
➢Action or Activity State: An activity represents execution of an action on objects or by objects.
➢Action Flow or Control flows: Action flows or Control flows are also referred to as paths and
edges.
➢Decision node and Branching: When we need to make a decision before deciding the flow of
control, we use the decision node.
➢Guards: A Guard refers to a statement written next to a decision node on an arrow sometimes
within square brackets.
➢Join: Forks and join nodes generate the concurrent flow inside the activity.
➢Final State Notation: Final state is used to show the end of a process.

System Modeling
Dr. K. Adisesha
10
Activity diagrams using UML:
We use Activity Diagrams to illustrate the flow of control in a system and refer to the
steps involved in the execution of a use case.
➢How to Draw an activity diagram –
❖Identify the initial state and the final states.
❖Identify the intermediate activities needed to
reach the final state from he initial state.
❖Identify the conditions or constraints which
cause the system to change control flow.
❖Draw the diagram with appropriate notations.
business flow activity of order processing

System Modeling
Dr. K. Adisesha
11
Use case Diagrams using UML:
A use case diagram is used to represent the dynamic behavior of a system. It
encapsulates the system's functionality by incorporating use cases, actors, and their
relationships.
➢It depicts the high-level functionality of a system and also tells how the user handles a
system.
➢The main purpose of a use case diagram is to portray the dynamic aspect of a system.
❖It gathers the system's needs.
❖It depicts the external view of the system.
❖It recognizes the internal as well as external factors
that influence the system.
❖It represents the interaction between the actors.

System Modeling
Dr. K. Adisesha
12
Use case Diagrams using UML:
Various graphical elements are used in a Use Case Diagram to represent different
entities and relationships:
❖Oval: Represents a use case.
❖Stick Figure: Represents an external actor.
❖Dashed Line: Indicates an association.
❖Solid Line with Arrowhead: Represents an
“include” relationship.
❖Dashed Line with Arrowhead: Denotes an
“extend” relationship.

System Modeling
Dr. K. Adisesha
13
Use Case diagram using UML:
A use case diagram is used to represent the dynamic behavior of a system. It
encapsulates the system's functionality by incorporating use cases, actors, and their
relationships.
➢It models the tasks, services, and functions required by a system/subsystem of an application.
➢It depicts the high-level functionality of a system and also tells how the user handles a system.
➢Following are the purposes of a use case diagram given below:
❖It gathers the system's needs.
❖It depicts the external view of the system.
❖It recognizes the internal as well as external factors that influence the system.
❖It represents the interaction between the actors.

System Modeling
Dr. K. Adisesha
14
Use Case diagram using UML:
Here the Web Customer actor makes use of any online shopping website to purchase
online. The top-level uses are as follows; View Items, Make Purchase, Checkout, Client
Register.
Use Case Diagram
❖The View Items use case is utilized by the customer
who searches and view products.
❖The Client Register use case allows the customer to
register itself with the website for availing gift
vouchers, coupons, or getting a private sale invitation.
❖It is to be noted that the Checkout is an included use
case, which is part of Making Purchase, and it is not
available by itself.

System Modeling
Dr. K. Adisesha
15
Class diagrams using UML:
Class diagrams are the main building blocks of every object-oriented method. The class
diagram can be used to show the classes, relationships, interface, association, and
collaboration.
Class Diagrams
➢The main purpose to use class diagrams are:
❖This is the only UML that can appropriately
depict various aspects of the OOPs concept.
❖Proper design and analysis of applications can be
faster and efficient.
❖It is the base for deployment and component
diagram.

System Modeling Types
Dr. K. Adisesha
16
Context and Process models:
Process models reveal how the system being developed is used in broader business
processes.
➢Context models simply show the other systems in the environment, not how the system
being developed is used in that environment.
➢System boundaries are established to define what is inside and what is outside the
system.
➢Architectural models show the system and its relationship with other systems.
➢UML activity diagrams may be used to define business process models.

System Modeling Types
Dr. K. Adisesha
17
Context Models:
Context models are used to illustrate the operational context of a system - they show
what lies outside the system boundaries.
➢Context models simply show the other systems in the environment, not how the system
being developed is used in that environment.
➢Social and organisational concerns may affect the decision on where to position system
boundaries.
➢System boundaries are established to define what is inside and what is outside the
system.
➢Architectural models show the system and its relationship with other systems.
➢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.

System Modeling Types
Dr. K. Adisesha
18
Context Models:
The example below shows a UML activity diagram describing the process of
involuntary detention and the role of MHC-PMS (mental healthcare patient
management system) in it..
Activity diagram of MHC-PMSContext of MHC-PMS

System Modeling Types
Dr. K. Adisesha
19
Process Models:
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.
➢The example below shows a UML
activity diagram describing the
process of involuntary detention
and the role of MHC-PMS (mental
healthcare patient management
system) in it.

Interaction models
Dr. K. Adisesha
20
Interaction models:
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.
➢Types of interactions that can be represented in a model:
❖Modeling user interaction is important as it helps to identify user requirements.
❖Modeling system-to-system interaction highlights the communication problems that
may arise.
❖Modeling component interaction helps us understand if a proposed system
structure is likely to deliver the required system performance and dependability.

Interaction models
Dr. K. Adisesha
21
Interaction models:
Use cases were developed originally to support requirements elicitation and now
incorporated into the UML.
➢Actors in a use case may be people or other systems. Use cases can be represented
using a UML use case diagram and in a more detailed textual/tabular format.
➢Simple use case diagram:

Interaction models
Dr. K. Adisesha
22
Interaction models:
Tabular description of the ‘Transfer data’ use-case.
Use cases in the MHC-PMS involving
the role ‘Medical Receptionist’

Interaction models
Dr. K. Adisesha
23
Sequence Diagrams:
UML Sequence diagrams are 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.

Interaction models
Dr. K. Adisesha
24
Sequence Diagrams:
UML Sequence diagrams are used to model the interactions between the actors and the
objects within a system.

Structural Models
Dr. K. Adisesha
25
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.
➢UML class diagrams are 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.

Structural Models
Dr. K. Adisesha
26
Class Diagrams:
UML class diagrams are used when developing an object-oriented system model to
show the classes in a system and the associations between these classes.
➢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.,

Structural Models
Dr. K. Adisesha
27
Generalization / Aggregation model :
In a generalization/ aggregation model, the attributes and operations associated with
higher-level classes are also associated with the lower-level classes.
➢Generalization is implemented using the class inheritance mechanisms, the lower-level
classes are subclasses inherit the attributes and operations from their super classes.
❖ These lower-level classes then add more specific attributes and operations higher-
level classes.
➢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.

Structural Models
Dr. K. Adisesha
28
Generalization Model :
In a generalization/ aggregation model, the attributes and operations associated with
higher-level classes are also associated with the lower-level classes.
➢Generalization is an everyday technique that we use to manage complexity.
➢In modeling systems, it is often useful to examine the classes in a system to see if there
is scope for generalization.
➢If changes are proposed, then you do not have to look at all classes in the system to see
if they are affected by the change.
➢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.

Structural Models
Dr. K. Adisesha
29
Generalization Model :
In a generalization/ aggregation model, the attributes and operations associated with
higher-level classes are also associated with the lower-level classes.
➢A generalization hierarchy with added detail

Structural Models
Dr. K. Adisesha
30
Aggregation model :
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.
➢The aggregation association

Behavioral models
Dr. K. Adisesha
31
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.
➢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.
➢Two types of Behavioral models:
❖Data-driven models: Some data arrives that has to be processed by the system.
❖Event-driven models: Some event happens that triggers system processing. Events
may have associated data, although this is not always the case.

Behavioral models
Dr. K. Adisesha
32
Behavioral models:
Behavioral models are models of the dynamic behavior of a system as it is executing.
➢Data-driven models: show the sequence of actions involved in processing input data
and generating an associated output.
➢They are particularly useful during the analysis of requirements as they can be used to show
end-to-end processing in a system.
➢Data-driven models can be created using UML activity or sequence diagrams:

Behavioral models
Dr. K. Adisesha
33
Behavioral models:
Behavioral models are models of the dynamic behavior of a system as it is executing.
➢Event-driven models: shows how a system responds to external and internal events.
➢It is based on the assumption that a system has a finite number of states and that events
(stimuli) may cause a transition from one state to another.
➢Real-time systems are often event-driven, with minimal data processing.
➢For example, a landline phone switching system responds to events such as 'receiver
off hook' by generating a dial tone.
➢Event-driven models can be created using UML state diagrams:

Behavioral models
Dr. K. Adisesha
34
Behavioral models:
Event-driven models : shows how a system responds to external and internal events.
➢Event-driven models can be created using UML state diagrams:

Model-Driven Engineering
Dr. K. Adisesha
35
Model-Driven Engineering:
Model Driven Engineering (MDE) is a software development methodology that focuses
on creating and exploring domain models, which are conceptual models of all topics
related to a problem-specific domain.
➢Model-driven engineering (MDE) is an iterative and incremental software development
process.
➢Model-driven engineering (MDE) promotes the development of models at different levels of
abstraction.

Model-Driven Engineering
Dr. K. Adisesha
36
Usage of model-driven engineering:
Model-driven engineering is still at an early stage of development, and it is unclear
whether or not it will have a significant effect on software engineering practice.
➢Pros
❖Allows systems to be considered at higher levels of abstraction
❖Generating code automatically means that it is cheaper to adapt systems to new
platforms.
➢Cons
❖Models for abstraction and not necessarily right for implementation.
❖Savings from generating code may be outweighed by the costs of developing
translators for new platforms.

Model-Driven Engineering
Dr. K. Adisesha
37
Types of model:
MDA is a model-focused approach to software design and implementation that uses a
subset of UML models to describe a system.
➢Computation independent model (CIM): These model the important domain
abstractions used in a system. CIMs are sometimes called domain models.
➢Platform independent model (PIM): These model the operation of the system without
reference to its implementation. The PIM is usually described using UML models that
show the static system structure and how it responds to external and internal events.
➢Platform specific models (PSM): These are transformations of the platform-
independent model with a separate PSM for each application platform. In principle,
there may be layers of PSM, with each layer adding some platform-specific detail.

Model-Driven Engineering
Dr. K. Adisesha
38
Agile methods and MDA:
The developers of MDA claim that it is intended to support an iterative approach to
development and so can be used within agile methods.
➢The notion of extensive up-front modeling contradicts the fundamental ideas in the
agile manifesto, that few agile developers feel comfortable with model-driven
engineering.
➢If transformations can be completely automated and a complete program generated
then, MDA could be used in an agile development process as no separate coding would
be required.
➢This is possible using a subset of UML 2, called Executable UML or xUML.

Discussion
Dr. K. Adisesha
39
Queries ?
Prof. K. Adisesha
9449081542
Reference: Sommerville, Software Engineering, 10 ed.,