Topic 16 Structured design - start [Perun · 2011. 3. 27. · Structured design Parts of this topic...
Transcript of Topic 16 Structured design - start [Perun · 2011. 3. 27. · Structured design Parts of this topic...
1
Humboldt University Berlin, University of Novi Sad, University of Plovdiv,University of Skopje, University of Belgrade, University of Niš, University of Kragujevac
Version: Feb. 19, 2003 (D Jan, 30, 2003)
DAAD Project“Joint Course on Software Engineering”
Topic 16Structured design
Parts of this topic use material from the textbook H. Balzert, “Software-Technik”, Vol. 1, 2nd ed., Spektrum Akademischer Verlag, 2001
2
2DAAD project „Joint Course on Software Engineering“ ©
16. Structured design
a) Overview
b) Description method: Structure chart
c) Example ‚Seminar Organization‘
3
3DAAD project „Joint Course on Software Engineering“ ©
no abstraction
SC: -M / C: -S:
Class abstraction
Dataabstraction
Functionalabstraction
Data-abstraction
SC: Functions/Procedures
M / C: SDL: Pascal, C,
Fortran,Cobol L85, Basic,Assembler
SC: abstractdata objects
M / C: SD after Buhr
L: Modula-2
SC: ADT (abstractdata type)
M / C: Booch,OOSD
L: Ada
SC: ClassesM / C: OODL: Java, C++
Legend: SC = System component M / C = Method / ConceptL = Programming language
0 4321
time
Structured analysis
Object-oriented analysis
Analysis method flows into the suitable design method
Structured design
Object-oriented design
4
4DAAD project „Joint Course on Software Engineering“ ©
Structured design (SD): Overview
Design methods in many variants: • /Stevens et al. 74/, /Stevens 81/• /Myers 75, 78/• /Yourdon, Constantin 79/• /Page-Jones 88/
Software architecture = Hierarchy of functional components(functions, procedures, subroutines)
Description method:• Structure charts
5
5DAAD project „Joint Course on Software Engineering“ ©
Basic concepts of … software developmentBalzert vol. 1, 2nd edition 2001
Function tree
Data-Dictio-nary1979
Class diagram 1980/1990
Box diagram
1973
Program flowchart
1966
Pseudocode
Decision tables
1957
Rules Petri Net1962
Sequ-encediagram
1987
Stateautomaton1954
Entity Relation-ship Model1976
Data flow diagram1966
Use Case Diagram1987
Activity diagram
1997
Collabo-ration diagram
Functional View Data-Oriented View Object-Oriented View
Algorith-mic View
Functionalhierarchy
BusinessProcess
Infor-mationFlow
Class structures
Data Structures
Rule-Based View
State-Oriented View
Controlstructures
If-Thenstructures
Entity types and relations
Finite State Automaton
Concurrentstructures
Interactionstructures
Scenario-Based View
Structure Chart
Structured Analysis
Change of description
method
Structured design
6
6DAAD project „Joint Course on Software Engineering“ ©
Structured design: assessment
Software architectures that predominantly consist of functional components, are rare: • Multi-pass compilers • Numerical algorithms• etc.
7
7DAAD project „Joint Course on Software Engineering“ ©
History
Edward Yourdon*30.4.1944 Software engineering consultantNew YorkCo-inventor of structured design 1979 (Book: Structured Design,together with L. L. Constantine)Pioneer of object-oriented analysis 1990 (Book: Object-Oriented Analysis,together with P. Coad).
8
8DAAD project „Joint Course on Software Engineering“ ©
16. Strustured design
a) Overview
b) Description method: Structure chart
c) Example ‚Seminar Organization‘
9
9DAAD project „Joint Course on Software Engineering“ ©
Structure chartGraphical representation of functional abstractions and their cooperation (call relationships, parameter passing)Example of parameter passing: function for „calculation of interest“
a p date
1
date
2
inte
rest
Interestfunctional
abstraction
in out
10
10DAAD project „Joint Course on Software Engineering“ ©
unit name
call arrow
input parameter
in
in/out
out
state
calling unit
unit (sub-routine,procedure, function, operation)
transient parameter
state after execution of B
output parameter
called unitB
A
Structure chart: call structure
Clarification of call structure and data flow between units (functions)
11
11DAAD project „Joint Course on Software Engineering“ ©
16. Structured design
a) Overview
b) Description method: structure chart
c) Example ‚Seminar Organization‘
12
12DAAD project „Joint Course on Software Engineering“ ©
DFD 4.3: Book Presen-tations(Detail)
regi
stra
tion
data
first
invo
ice
data
personalNo
presentationNo
registration date
registration receipt
notif
icat
ion
over
book
ed
notifica
tion
false
presen
tation
notification
paying delay
first invoice
data base seminars and customers
payi
ng d
elay
part
icip
ants
cur
rent
part
icip
ants
max
pres
enta
tionN
o
regi
stra
tion
date
Invo
ice
on
rece
ipt o
n
1 Record
registrations
13
13DAAD project „Joint Course on Software Engineering“ ©
Invoice data sets
Regi
stra
tion
date
Registration data = PersonalNr + SeminarNr + Registration date
Paying delay
Client
Booking
Seminar presentation
Invoice data
Recordregistrations
1Notifaction payment delayNotification overbookedRegistr
ation receipt
Notific
ation
false
pres
entat
ion
PersonalNrRegistration
data
Personal-Nr
SeminarNr
Invo
ice on
Rece
ipt o
n
Participants max
PresentationNr
Particpants
current
DFD 4.3: towards database design
data base
seminars and customers
...
Databasedesign:
Database tables
*
*
*
*
*
14
14DAAD project „Joint Course on Software Engineering“ ©
Registration date
Regist
ration
date
Recordregistrations
SQL-select payment delay
SQL-select/insert booked
Enternew client
Stat
usN
ame
Adre
ssSt
atus
Pers
onal
Nr
PersonalN
rPresentationN
r Status
StatusPersonalNr Paym
ent delaySQL-select client
read registration date
Presen
tation
Nr
Person
al-Nr
Pers
onal
-Nr
Nam
eAd
ress
Provide registration receipt
Provide notificationoverbooked
Provide notificationfalse presentation
Provide notificationpayment delay
SQL-select/update presentation
Status
Presentation data
PresentationNr
Notification payment delay
Notification false presentation
Notification overbooked
Registration receipt
Structure chart: record registrations
Pre-implemented function
User interfacefunctions Database
functions User definedfunctions
Part of software architecture according to structured design
15
15DAAD project „Joint Course on Software Engineering“ ©
Comments on structure chart „record registrations“ (1)
„Record registrations “ is main functionAll other functions: help functions, local functions, which are called from main functionFunctions are called from left to right
16
16DAAD project „Joint Course on Software Engineering“ ©
Comments on structure chart „record registrations“ (2)
Call relations and parameter passing:• ‚read registration date‘: read from user-interface• ‚SQL: select client‘:
- Search DB for client, using key ‚PersonalNr‘found: name, address, status = trueotherwise: status = false