PDF - INF I-CHAP 02-Software-Engineering Part 01-EN
PDF - INF I-CHAP 02-Software-Engineering Part 01-EN
„Engineering Informatics I“
WS 2024/2025
Software-Engineering, Part 01
2 Software Engineering
1 Introduction
2 Basics of Software Engineering
2.1 Core Processes
2.1.1 Requirements Engineering
2.1.1.1 UML
2.1.2 Software Design
2.1.3 Implementation
2.1.4 Testing
2.1.5 Maintenance
04.10.2024 | Department 13 | Institute of Numerical Methods and Informatics in Civil Engineering | Prof. Dr.-Ing. Uwe Rüppel | 1
1 Introduction
"Software misery" at the opening of Chek Lap Kok Airport in
Hong Kong
https://www.youtube.com/w
atch?v=fRXHr0bnoS0
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 2
Success statistics of IT projects
- Beginn OOP
Bases on Source: CHAOS Report, Standish Group International, Inc., 2000; VDI Nachrichten 2007
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 3
"Soft indicators" for the failure of a project (in
addition to standard target-actual controls)
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 4
Indicators
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 5
Software Lifecycle (1)
Planning
Decision on development
Basic characteristics
Feasibility
Analysis
Question about the WHAT
Requirement Definition
Identify objects and operations of the problem area from the user's point of view and
identify their dynamic interaction
Design
Question about the HOW
Specify system components and interfaces, as well as their interaction
GUI, data and process management
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 6
Software Lifecycle (2)
Implementation phase
Introductory phase
Usage phase
Eliminate bugs
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 7
2. Basics of Software-Engineering
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 8
2.1 Core processes
2.1.1 Requirements Engineering
The aim of requirements management is to achieve a common understanding of a
system to be developed between the contractor and the client. At the same time,
the resulting documents often serve as a contractual basis for further
implementation.
A common understanding can be achieved through the introduction and
implementation of requirements management methods (e.g. requirements analysis,
requirements specification, requirements modeling, requirements reviews). By using
these methods, the quality of the requirements documentation can be increased.
Quality criteria of a requirements documentation are, among other things,
comprehensibility, unambiguity, verifiability, consistency, completeness, testability.
The management of requirements means that processes are defined and
implemented by updating the requirements documentation throughout the course of
the project and using it as a basis for the creation of test cases at the end.
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 9
2.1.1 Requirements Engineering
Quelle: vitolavecchia.altervista.org
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 10
Requirements Engineering
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 11
2.1.1.1 Unified Modeling Language (UML)
(1) Introduction
Why UML
for the
installation
of a swing ?
The contents of
the text or image
quotation are
discussed
scientifically within
the framework of
the context of the
lecture.
Source: Wikipedia
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 12
UML: Why? -> Benefits
• Provides traceability from the first draft to the finished system (traceability).
• ...
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 13
UML: What?
Standardized (www.omg.com)
Conceptual world (modelling concepts),
semantics (importance of modeling concepts),
Visual representation (notation of modeling concepts)
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 14
History
Source: Wikipedia
UML 2.3
UML 2.4.1 2011 -> 2.5.1 2017
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 15
Semantical Areas of UML
https://www.omg.org/spec/UML/2.5.1/PDF
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 16
(2) Use case diagram (external view of the
system)
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 17
(3) Class and object diagram
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 18
(3)
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 19
Class & Object Diagram: Selected Relationships
https://www.visual-
paradigm.com/guide/uml-unified-modeling-
language/uml-class-diagram-tutorial/
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 20
Class and object diagram: e.g. traffic light
intersection
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 21
(4) Sequence diagram
https://www.uml-diagrams.org/
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 22
Sequence diagram: e.g. traffic light
intersection
C
D
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 23
(5) State diagram (state machine)
https://drawio-app.com/uml-state-diagrams-with-draw-io/
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 24
State diagram: e.g. traffic light intersection
1 2 3 4
LightLife
switchLight RedYellow switchLight
Phase=2
Red Green
Phase=1 Phase=3
Yellow
switchLight Phase=4 switchLight
Init
[InitPhaseEqualTo(1)] [InitPhaseEqualTo(3)]
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 25
State diagram: e.g. traffic light intersection
ctd.
LightLifeNorthSouth switchLight RedYellow switchLight
Phase=2 1 2 3 4
Red Green
Phase=1 Phase=3
Yellow
switchLight Phase=4 switchLight
ControlLife
switchControl switchControl switchControl switchControl switchControl
Red_Grn Red_Ylw RedYlw_Red Grn_Red Ylw_Red Red_RedYlw
Phase=1 Phase=2 Phase=3 Phase=4 Phase=5 Phase=6
switchControl
3 4 1 2
LightLifeWestEast switchLight RedYellow switchLight
Phase=2
Red Green
Phase=1 Phase=3
Yellow
switchLight Phase=4 switchLight
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 26
(6) Communication diagram
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 27
Communication diagram: e.g. traffic light
intersection
1: createControl
2: createLight
3: switchLight
4: switchLight
5: switchLight
6: switchLight
7: switchLight
8: switchLight
2.1d: createLight(3)
2.1c: createLight(3)
2.1a: createLight(1) A 2.1b: createLight(1)
3.1c: switchLight
3.1d: switchLight
B 4.1c: switchLight
4.1d: switchLight
4.1a: switchLight C 4.1b: switchLight
5.1a: switchLight D 5.1b: switchLight
6.1a: switchLight E 6.1b: switchLight
7.1c: switchLight
7.1d: switchLight
7.1a: switchLight F 7.1b: switchLight
8.1c: switchLight
8.1d: switchLight
A
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 28
(7) Activity diagram (selected elements)
https://www.educba.com/uml-activity-diagram/
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 29
Activity diagram: e.g. traffic light intersection
Swim lanes
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 30
(8) Component diagram
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 31
Component diagram: e.g. traffic light
intersection
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 32
(9) Distribution diagram
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 33
(10) Package diagram
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 34
(11) Timing diagram
https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-timing-
diagram/
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 35
(12) Interaction overview diagram
https://www.visual-paradigm.com/guide/uml-
unified-modeling-language/what-is-interaction-
overview-diagram/
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 36
(12) Interaction overview diagram (ctd.)
https://www.visual-paradigm.com/guide/uml-
unified-modeling-language/what-is-interaction-
overview-diagram/
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 37
(13) Composition structure diagram
What do the internals of a class, component, or other system part look like?
Top-down modeling of the system
• Shows the internal parts of a class.
• Parts are named: partName:partType[multiplicity]
• Aggregated classes are parts of a class but parts are not necessarily classes, a part is
any element that is used to make up the containing class
• Allow the users to "Peek Inside" an object to see exactly what it is composed of.
• The internal actions of a class, including the relationships of nested classes, can be
detailed.
• Objects are shown to be defined as a composition of other classified objects
https://www.visual-paradigm.com/guide/uml-unified-modeling-
language/what-is-composite-structure-diagram/
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 38
Overview UML 2.5
https://www.uml-diagrams.org/uml-25-diagrams.html
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 39
2.1.2 Design (software design)
• UML Diagrams
•
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 40
Creational Patterns
Creation patterns are used to create objects. They decouple the construction of an
object from its representation. Object creation is encapsulated and outsourced to keep
the context of object creation independent of the concrete implementation.
Structural Patterns
Facilitate the design of software with ready-made templates for relationships between
classes.
Behavioral Patterns
Model complex behavior of the software and thus increase the flexibility of the software
with regard to its behavior.
Pattern for object-relational mapping
Used to deposit and access objects and their relationships in a relational database (see
module IMV)
…
https://de.wikipedia.org/wiki/Entwurfsmuster
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 41
2.1.3 Implementation
Programming Paradigms
https://www.youtube.com/watch?v
(1) Turingmaschine (by Alan =gtRLmL70TH0
Turing)
Alan Turing, 1912 - 1954 8:13
Minimal architecture of a
computer or software system,
defined by a set of axioms (i.e. a
programming language). Makes
statements about the solvability of
a problem by means of software
(whether and not how).
Turing completeness of a
language means that it is possible
to calculate any function that a
Turing machine can calculate.
According to Church-Turing's
thesis, this is synonymous with the
ability to calculate any computable
function.
(see Cryptography, INF II)
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 42
Programming Paradigms
https://www.youtu
be.com/watch?v=
09:23 SbqXqQ-2ixs
(2) Von Neumann's
computer
architecture
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 43
The von Neumann Architecture
https://semiengineering.com/von-neumann-is-struggling/
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 44
Programming Paradigms
Deutsches
Museum in Munich
Subtitles in
English!
5:11
https://www.y
outube.com/w
atch?v=aUXn
hVrT4CI
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 45
Programming Paradigms
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 46
Programming Paradigms
At the beginning of the eighties, the language C++ was developed in the
AT&T Bell laboratories of Bjarne Stroustrup.
The first compilers for the PC and workstation sector have existed since
1988. Since 1995, JAVA has become popular via SUN and
Netscape.
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 47
Object-Oriented Programming, OOP (1)
Object
Definition of a data structure and the operations
allowed for it (class)
Instance
An area of the memory existing at runtime to Objekt
Private
which the definition of the object is applied Daten / Methoden
Method
Description of the functionality of the object, i.e. Objekte bestehend aus
Daten und zugehörigen Methoden
the behavior in certain cases. als informationstechnische Einheiten.
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 48
OOP (2)
Internal methods
Support functions for supplying the interface (private).
Encapsulation
Bundling of data and permitted operations within an object.
Information protection
The internal structure of the object is not accessible to the user (the programmer) (private).
Message
Call a (public) method of an object.
Inheritance
Derivation of an object O2 from an object O1, where O2 takes over the data and methods
of O1 completely or partially. Inherited data and methods can be modified and extended.
In addition, own data and methods can be defined.
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 49
OOP (3)
Multiple inheritance
Derivation of an object O3 from an object O1 and an object O2, whereby O3
takes over the data and methods of O1 and O2 completely or partially.
Inherited data and methods can be modified and extended. In addition, own
data and methods can be defined.
Object Hierarchy
Network of relationships between the objects.
Polymorphism
Different objects react differently to the same message according to their
peculiarity.
Dynamic (late) binding
Assignment of the data and methods at the late possible time (cf. early
binding: assignment at the time of compilation).
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 50
E.g. for late binding in JAVA
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 51
2.1.4 Testing
Verification – Validation (Software Testing)
Verification in computer science is a process that ensures that a program or system is
"compliant" with a specification ("Is the system built correctly?", "Is the specification
fulfilled?", rather from a development point of view).
In contrast to this is validation, i.e. the documented plausibility check that a system meets
the requirements in practice ("Does the system work correctly?", "Are the input-output
relations correct?" "Are the results correct?", rather from the point of view of the
application).
Formal verification includes a formal specification (for example, in the form of logic, a
specification language such as Z, or the input language of Matlab/Simulink), and a formal
understanding of what "compliant" should mean..
In extreme cases, a formal verification can be a mathematical proof that a program (i.e. a
concrete implementation) complies with the given specification. Conformity then means
validity in the logical sense, i.e. the program must behave as required by the specification
for all logically possible inputs.
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 52
Free of error !?
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 53
Mathematical verification
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 54
The Hoare Calculus
Basic idea:
A program is correct with regard to its pre- and post-
condition if the post-condition applies to each
execution of the program to which the pre-condition
has also applied.
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 55
Module test (low-level test)
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 56
Integration test (Higher-Level-Test)
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 57
System test (high-level test)
The reason for this is that all program functions and also all possible values in the
input data would have to be tested in all their combination – which is practically
impossible (except for very simple test objects). For this reason, various test
strategies and concepts deal with the question of how to achieve a large test
coverage with the lowest possible number of test cases.
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 58
Acceptance test
Especially for system and acceptance tests, the black box procedure is
used, i.e. the test is not based on the code of the software, but only on the
behavior of the software in specified situations/actions (inputs of the user,
limit values for data acquisition, etc.).
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 59
Verification according to ISO 9000
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 60
Quality management == ONLY tests ?
Pol, Koomen, Spillner: „Tests are not the only measure in the quality management of
software development, but often the last possible one. The later errors are
discovered, the more time-consuming their correction is, from which the reverse
conclusion is derived: Quality must be implemented (throughout the course of the
project) and cannot be "tested"." .... "When testing in software development, a more
or less large number of errors than normal is usually assumed or accepted.
Here there is a considerable difference to the hardware industry: In the quality control
process phase, errors are often only expected in extreme situations."
-> Quantile: Probability of failure, i.e. the proportion (in %) of samples related to the total
number of samples in series production, for which the test results have smaller values
than the required minimum values.
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 61
Software Testing Life Cycle
1. Requirements Review
Every test should come from a requirement. And every
requirement should have a test.
2. Test Planning
Preparing a test plan will help you align testing efforts with
requirements.
What you’re going to test.
How you’ll test it.
Who will do the testing.
3. Test Cases
Once you have a test plan, you’ll need to create test cases.
A test case should detail how you’re going to test a
particular requirement. It should also include a step-by-step
process for running the test. Your test case may also
indicate what type of test you’ll be running (e.g., manual vs.
automated testing).
Test cases should also be prioritized, so you test the most
important things first. And individual test cases may be part
of a test suite.
https://www.perforce.com/blog/alm/what-software-testing
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 62
Software Testing Life Cycle (2)
5. Test Runs
When your test environment is ready, you can start test execution.
Tests will either pass or fail. If a test fails, bugs found in the test
should be documented (and connected to the requirement that was
tested). You should run the test again — as changes are made to
your software — to verify that the bug has been fixed.
Creating a test matrix — or a requirements traceability matrix —
will help you keep track of the status of testing.
6. Test Reporting
You may need to report on test results to your team — or to other
stakeholders within your company.
Here are some common test reporting metrics:
Test velocity, Test status, Test results, Overall test summary
https://www.perforce.com/blog/alm/what-software-testing
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 63
2.1.5 Software Maintenance
04.10.2024 | Lecture „Engineering Informatics I“ Chapter 02, Part 01 | Prof. Dr.-Ing. Uwe Rüppel | 64