Sunteți pe pagina 1din 7

1

Universitt Stuttgart
Institute of Industrial Automation and Software Engineering
Prof. Dr.-Ing. Dr. h. c. P. Ghner
2004 IAS, Universitt Stuttgart
Exercises Software Engineering
for Real-Time Systems
Introduction
Structured Design and Modular Design
Exercise 9: System Design
2
2004 IAS, University of Stuttgart
Structured Design (SD)
Creating a software architecture consisting of hierarchic functional modules.
Structure diagrams and module specifications can be used to describe such
software architectures.
Functional Abstraction
Objective:
float sqrt(float x)
{
...
calculates the square
root of x
...
}
Example:
denoted as so-called functional module
sqrt
x sqrt
Representation as structure diagram symbol
3
2004 IAS, University of Stuttgart
Structure diagrams
graphic representation of functional modules and the control and data flow
between them
A
B
abc def
xyz
status
calling module
transient parameter
output parameter
called module
input parameter
call
module name
status after
completion of B
4
2004 IAS, University of Stuttgart
Control flow concepts
A
B C
sequence
A
B C
selection
A
B C
iteration
A B
C D
Connectors
A B
C
D D
D
D
help to reduce intersections of control flow arrows
5
2004 IAS, University of Stuttgart
Modular Design (MD)
functional abstraction is not sufficient for many applications
data abstraction is needed, too
data abstraction means a concept for representing a data structure and its
access routines.
there are two approaches of data abstraction
abstract data objects (ADO)
abstract data types (ADT)
6
2004 IAS, University of Stuttgart
Abstract Data Objects (ADO)
allow to package data structures and access routines in a common unit
the data values are supposed to be persistent, i.e. remain available after
an access routine call has been completed
an abstract data object exists exactly once in the whole program
similar to an object in object orientation
A B
internal
memory
Notation:
7
2004 IAS, University of Stuttgart
Abstract Data Types (ADT)
an abstract data type stands for a set of abstract data objects of the same
kind
when calling access routines the concerned object must be addressed
explicitly
similar to a class in object orientation
A B
internal
memory
Notation:

S-ar putea să vă placă și