Sie sind auf Seite 1von 15

15

Charlie Abela - Edited by


Riccardo Flask
Systems Development 29
Home Security: DFD Level 0
Charlie Abela - Edited by
Riccardo Flask
Systems Development 30
ATM: DFD level 0
Context Diagram
ATM
Teller
System
Date-time
Cust-inIo
Prompts
Service
Receipt-details
Printer
Customer
System
Clock
16
Charlie Abela - Edited by
Riccardo Flask
Systems Development 31
DFD: Level 1
Show
{ the system in more detail
{ how data enter the system
{ how these data items are transIormed
{ how they leave the system
Guidelines
{ Try to identiIy potential processes: 3-7
{ IdentiIy data Ilows anything that moves around
{ IdentiIy and list the data stores
{ Draw the level 1 diagram
Charlie Abela - Edited by
Riccardo Flask
Systems Development 32
Home Security: DFD level 1
17
Charlie Abela - Edited by
Riccardo Flask
Systems Development 33
ATM: DFD Level 1
1.0
Verify
Customer
D
3.0
Process
Transaction
4.0
Perform
Accounting
A
T
M

c
a
r
d

n
o
prompts
lost-stolen_list
P

N service requested
transaction
Database
Time
/date
log-n_nfo
transaction
data
balance_
limit
account_details
transaction
data
a
c
c
o
u
n
t
_
d
e
t
a
i
l
s
Customer
Printer
System
Clock
Charlie Abela - Edited by
Riccardo Flask
Systems Development 34
DFD Level 0
A club sends out annual reminders to members to pay their
subscription Ior another year. An analysis oI member types
(Family, Junior, Senior) is made to be presented at the annual
meeting
CLUB MEMBERSHIP
Member details
Name &
Payment
Payment
reminder
Member
Treasurer
AnnuaI
GeneraI
Meeting
Member
Number and
categories of
members
A Context Diagram or top IeveI DFD (LeveI 0)
1
Club
18
Charlie Abela - Edited by
Riccardo Flask
Systems Development 35
DFD Level 1
A level 1 DFD can then be drawn showing a process to
handle each incoming data Ilow and a process to generate
each output data Ilow CLUB MEMBERSHIP
1
Sends
reminder
s
Member
details
Name &
Payment
Name &
Payment
2
Record
payment
Number and
categories of
members
Amount
due
Treasurer
Member
Treasurer
Members
At
AGM
LeveI 1 DFD
Charlie Abela - Edited by
Riccardo Flask
Systems Development 36
DFD Level 2
A level 2 DFD
may show part oI
this system in
greater detail, and
could be included
in the Design
section oI the
project.
1
Record
Payment
Name, Amount
Status (Paid)
Member D,
Category
2
Prepare
Receipts
Members detaiIs
Payment
DetaiIs
Name, Address
Name, Address,
Date, Amount
Member status,
Category
Treasurer
Member
Member detaiIs
3
Analyze
membership
and print
report
Members
At
AGM
D, Date,
Amount
D, Date,
Amount
Member status,
Category
CLUB MEMBERSHIP
LEVEL 2 DFD
19
Charlie Abela - Edited by
Riccardo Flask
Systems Development 37
Example: ATM Requirements
The ATM will service one customer at a time. A customer will be required to
insert an ATM card and enter a personal identiIication number (PIN) - both
oI which will be sent to the bank Ior validation as part oI each transaction.
The customer will then be able to perIorm one or more transactions. The card
will be retained in the machine until the customer indicates that he/she
desires no Iurther transactions, at which point it will be returned - except as
noted below.
The ATM must be able to provide the Iollowing services to the customer:
{ A customer must be able to make a cash withdrawal Irom any suitable account
linked to the card, in multiples oI Lm10.00. Approval must be obtained Irom the
bank beIore cash is dispensed.
{ A customer must be able to make a deposit to any account linked to the card,
consisting oI cash and/or checks in an envelope. The customer will enter the
amount oI the deposit into the ATM, subject to manual veriIication when the
envelope is removed Irom the machine by an operator. Approval must be
obtained Irom the bank beIore physically accepting the envelope.
{ A customer must be able to make a transIer oI money between any two accounts
linked to the card.
{ A customer must be able to make a balance inquiry oI any account linked to the
card.
Charlie Abela - Edited by
Riccardo Flask
Systems Development 38
Requirements Analysis Report
This report will cover the Iollowing areas:
{ An evaluation oI the current system, i.e.. its strengths
and weaknesses Irom the user`s point oI view
{ A detailed description oI the user requirements that
will be met by the new system
{ A description oI the organisation`s needs that the new
system will meet
{ Includes DFDs and other analysis tools such as
interviews, questionnaires etc
{ A description oI how the new system will work, i.e..
how it will meet the above requirements.
20
Systems Development
Systems Design,
Development and
Testing
Charlie Abela - Edited by
Riccardo Flask
Systems Development 40
Considerations during design
Output: report layouts and screen designs
Input: documents, screen layouts, validation procedures
User interface: how users will interact with the computer system
Type of system: batch, real-time, online
Files: contents, record layout, organisation and access methods
Processing: the programs and procedures needed and their detailed
design
Security: how the data is to be kept secure Irom accidental
corruption or deliberate tempering or hacking
Testing strategies: how the system is to be thoroughly tested
beIore going live
Hardware: which type oI computer, network capabilities and
conIigurations, input, storage and output devices will be used.
21
Charlie Abela - Edited by
Riccardo Flask
Systems Development 41
A Five-Step Procedure
A program is a list oI instructions that the
computer must Iollow in order to process data into
inIormation
Programming is a multistep process Ior creating
that list oI instructions
Sometimes also reIerred to as SoItware
Engineering
{ Implies the use oI best-practice processes to create
and/or maintain soItware
{ SoItware engineering involves the establishment and
use oI recognised engineering principles to obtain
soItware that is reliable and works eIIiciently.
Charlie Abela - Edited by
Riccardo Flask
Systems Development 42
A Five-Step Procedure |cont|
ClariIy the problem:
{ Look at inputs, outputs and processing requirements
Design the solution:
{ Use model tools to chart the program
Code the program:
{ Use a programming language to write the program
Test the program:
{ IdentiIy and remove logical errors or bugs Irom the program
Document and Maintain:
{ Write instructions Ior users, explanation oI the program and
operating instructions
22
Charlie Abela - Edited by
Riccardo Flask
Systems Development 43
ClariIy the Programming Needs
Problem clariIication consists oI clariIying
{ the program objectives and users,
{ outputs and inputs
{ processing tasks
{ Studying the Ieasibility oI the program
{ Documenting the analysis
Charlie Abela - Edited by
Riccardo Flask
Systems Development 44
Design the Program
To design the solution, an algorithm has to be
created.
An algorithm is a Iormula or set oI steps Ior
solving a particular problem
An algorithm has to be unambiguous and have a
clear ending point (ie. no inIinite loops)
Algorithms can be expressed in various was
23
Charlie Abela - Edited by
Riccardo Flask
Systems Development 45
Design the Program |cont|
The program design step can be divided
into two mini steps:
{ Determine the program logic through a top-
down approach and modularisation, using a
hierarchy chart
{ Then design in detail either using pseudo
code or a graphical representation such as
Ilowcharts
Charlie Abela - Edited by
Riccardo Flask
Systems Development 46
Detailed design: use oI Algorithms
An algorithm is a step-by-step process or
sequence oI instructions that can be used
to solve a problem in a Iinite amount oI
time.
24
Charlie Abela - Edited by
Riccardo Flask
Systems Development 47
Basic Flowcharts
The Ilowchart is one oI the most basic methods
Ior representing algorithms.
Nevertheless, nowadays, the main use oI
Ilowcharts is in systems Ilowcharts.
Over-use oI basic Ilowcharts should be avoided
as the resulting charts can become unwieldy and
counter-productive.
Flowcharts in their basic Iorm are adequate only
Ior the most basic documentation.
Charlie Abela - Edited by
Riccardo Flask
Systems Development 48
Program Flowcharts
CompIex
Task
ReIers to a complex task that requires
Iurther decomposition
25
Charlie Abela - Edited by
Riccardo Flask
Systems Development 49
Example
Look at next
pair of names
In correct
order?
Start
Name Sorting
Yes
No
Enter
Names
Set check'No'
Look at 1st
pair of names
Any more
names?
Output
Names
Stop
Yes
No
Swap
Names
Set
check'Yes'
Yes
Is Check
'Yes'
No
Charlie Abela - Edited by
Riccardo Flask
Systems Development 50
Pseudocode
Provides a means oI expressing algorithms without
worrying about the syntax oI a particular language.
No hard and Iast rules as to how pseudocode statements
are written
Keywords such as begin, end, while, endwhile, iI and
endiI mark limits oI procedures, loops and conditional
statements.
The actual statements oI the algorithm cab be written in
ordinary English.
Indentation is important
26
Charlie Abela - Edited by
Riccardo Flask
Systems Development 51
Pseudocode examples
Example 1: Given variables x and y, required to swap their contents
temp x
x y
y temp
Example 2: Given input number x, required to check whether even or odd.
II x mod 2 0 Then
output message even`
Else output message odd`
Example 3: Required to display integer numbers Irom 1 to 10.
i 0
while i 10 do
i i1
.
display the value oI i
endwhile
Charlie Abela - Edited by
Riccardo Flask
Systems Development 52
Pseudocode: Sorting Algorithm
Enter names
Repeat
set check No`
look at Iirst pair oI names
repeat
while names out oI order do
begin
swap names
set checkYes`
end
look at next pair oI names
until no more pairs oI names
Until check No`
Output names
27
Charlie Abela - Edited by
Riccardo Flask
Systems Development 53
Top-down design
Starts oII with the ideas at the highest level, i.e.
identiIy the major tasks to be perIormed.
Progressively work down to the lowest level oI
detail, i.e. Iurther decompose every task into
subtasks, until each subtask is simple enough to
be written as a selI-contained module (or
procedure)
Important when analysing problems that can be
structured in a hierarchical manner
Charlie Abela - Edited by
Riccardo Flask
Systems Development 54
Example: Top-down design
Problem
Module D Module B Module C
Module B1 Module B2
28
Charlie Abela - Edited by
Riccardo Flask
Systems Development 55
Bottom-up design
Design starts with the lowest level oI detail
Work up to the highest level
Equivalent to writing modules or procedures
Iirst, then combining these together to present a
higher level solution
OIten used in prototyping, whereby a number oI
modules are developed and then combined into
larger system modules.
Charlie Abela - Edited by
Riccardo Flask
Systems Development 56
Bottom-up design |cont|
In object-oriented programming this approach is
very popular.
{ Classes are built and packaged together to Iorm a
particular module.
{ These modules are then combined together or adapted
at will to Iorm other modules or systems.
Major problem with this design methodology is
to identiIy module interoperability issues, i.e.
whether modules that work perIectly on their
own, will still Iunction properly when combined
with other modules
29
Charlie Abela - Edited by
Riccardo Flask
Systems Development 57
Example: Bottom-up design
Module 3 Module 1
Module B
Module 2
Module A
Module C
Charlie Abela - Edited by
Riccardo Flask
Systems Development 58
In practice
Top-down and bottom-up approaches are
not mutually exclusive, meaning that good
design practice involves a combination oI
both these techniques.

Das könnte Ihnen auch gefallen