System Modeling in Software Engineering​

System Modeling in Software Engineering​

System modelling is a critical process in software engineering and various other fields that involves creating simplified, abstract representations of complex systems. The primary purpose of system modelling is to understand, analyze, and communicate the structure, behaviour, and interactions of a system.

  • 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 may represent a system using graphical notation,
    e.g. the Unified Modeling Language (UML).

Graphical Modeling

Graphical modelling is a method of representing information, systems, or processes using visual elements such as diagrams, charts, graphs, and symbols. It is a way to convey complex concepts, relationships, and structures in a more intuitive and visual format.

The following graphical representations (SE Diagrams) are used for system modelling in software engineering.

  1. Activity Diagrams: These diagrams depict the activities and processes involved in a system or data processing, showing the flow of tasks and their relationships.
  2. Use Case Diagrams: Use case diagrams illustrate the interactions and relationships between a system and its external environment, typically representing actors and the actions they can perform.
  3. Sequence Diagrams: Sequence diagrams are used to display interactions and sequences of messages between actors, objects, or system components over time, illustrating how various parts of a system work together.
  4. Class Diagrams: Class diagrams provide a visual representation of object classes within a system and the relationships (associations) between these classes, helping to model the structure of a system.
  5. State Diagrams: State diagrams depict how a system responds to internal and external events, displaying the different states a system or object can be in and the transitions between these states.

System Models in Software Engineering

From the system perspective, there are four types of models

  • Context models
  • Interaction models
  • Structural models
  • Behavioural models
  • Model-driven engineering

Context Models

  • Definition: Context models provide a high-level representation of a system’s environment and its interactions with external entities. They establish the system’s boundaries and illustrate the relationships with outside entities.
  • Example: Consider an automated teller machine (ATM) system. In a context model, you would depict the ATM as the system, and external entities could include the bank’s database, bank customers, and the network. Arrows connecting these entities to the ATM would represent actions such as “Withdraw Cash” and “Check Balance,” showing the system’s interactions with external elements.
Context Model for ATM System

Context Model for Hospital

Interaction Models

  • Definition: Interaction models focus on the dynamic aspects of a system by illustrating how its components or entities interact and exchange data. They often involve diagrams or sequence charts to represent the flow of information.
  • Example: In an ATM example, how a user communicates (interacts) with the ATM (system) to withdraw money. A typical ATM interaction begins with the user inserting their card, entering their PIN, and selecting a transaction like a cash withdrawal. The ATM verifies the PIN, checks the account balance, dispenses cash, and offers the option to print a receipt. Once the transaction is complete, the user retrieves their cash and card, ending the interaction.
Receptionist interaction with the system (use case)
Sequence Diagram for Interaction

Structural Models

  • Definition: Structural models focus on the static aspects of a system, emphasizing its components, their organization, and their relationships. They help to define the system’s architecture.
  • Example: This class diagram describes the structure of an ATM system. Each class has characteristics and functions. The bank class manages the ATM and can have one or many customers. Each customer can own zero or many debit cards and one account. The ATM transactions include both withdrawals and transfers. Each ATM transaction is modified by the account and identified by the ATM.
Structural model (class diagram) for patient management system
Class Diagram

Behavioural Models

  • Definition: Behavioral models describe how a system functions over time, emphasizing the system’s responses to various inputs or events. They help in understanding the system’s dynamic behaviour.
  • Example: Imagine an elevator system in a building. A behavioural model would include state diagrams showing how the elevator transitions between states (e.g., moving, stopping, opening doors, closing doors) based on user input and sensor data. This illustrates the dynamic behaviour of the elevator system.
Activity Diagram for Behavioral Model

These four types of models are crucial in software engineering and system development as they provide a structured way to understand, design, and communicate various aspects of a system, such as its environment (context models), interactions (interaction models), structure (structural models), and behaviour (behavioural models). They serve as valuable tools for system analysis, design, and documentation.

Model-driven engineering

Model-driven engineering (MDE) is an approach to software development where models rather than programs are the principal outputs of the development process. Proponents of MDE argue that this raises the level of abstraction in software engineering so that engineers no longer have to be concerned with programming language details or the specifics of execution platforms.

Self Assessment

  • What is the purpose of system modelling, and why is it essential in software engineering?
  • Can you explain the difference between structural and behavioural modelling in systems?
  • What is the role of a sequence diagram?

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this:
Verified by MonsterInsights