Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 © University of Sunderland IMSE Lecture 4 u so far all our structure charts have been produced from an English description, e.g. - night on the town.

Similar presentations


Presentation on theme: "1 © University of Sunderland IMSE Lecture 4 u so far all our structure charts have been produced from an English description, e.g. - night on the town."— Presentation transcript:

1 1 © University of Sunderland IMSE Lecture 4 u so far all our structure charts have been produced from an English description, e.g. - night on the town - meal with caviar - looking for a placement u more often we’ll be asked to produce a structure chart from a DFD which was drawn up in the requirements analysis stage u this is the aim of this week’s lecture and tutorial u the method of transforming a DFD into a structure chart is known as transform analysis

2 2 © University of Sunderland Revision: notes on Data Flow Diagrams u Data Flow diagrams show how data passes through the system and is transformed by each system function. u Arrows show the direction of data flow. Their name describes the data flowing along that path. u Rectangles show functions which transform inputs to outputs. Their names indicate their functions. u Detailed description of DFDs on p278-280 of Sommerville - though slightly different notation used.

3 3 © University of Sunderland Transform Analysis u a strategy for deriving high quality structure charts u appropriate for any system of the form input-process-output u 4 steps, producing 3 new diagrams: 1) annotate the DFD (without redrawing it) 2) draw intermediate diagram 3) draw first-cut structure chart 4) refine the structure chart u today we’ll cover the first 3 steps, the fourth step must wait a few weeks

4 4 © University of Sunderland Specification u Write a program which accepts a set of pre-validated examination marks in the range 0-100. A count of the number of marks entered in the following ranges is to be maintained: 0-10, 11-20, 21-30, 31-40,... 81-90, 91-100. u When all the marks have been entered the program will generate a graph displaying the count for each range.

5 5 © University of Sunderland Step 1 - Annotate the DFD u In step 1 we draw on the DFD itself, making 2 changes: a) identify the central transform b) add a control function

6 6 © University of Sunderland Step 1a - Identify the Central Transform u the Central Transform is the function (or functions) on a DFD which lie between input and output u the Central Transform starts work on the data when the input preliminaries have been completed and before the output activities begin

7 7 © University of Sunderland Step 1a (contd) u input preliminaries are known as the afferent (coming in) processes and include: –input of data into the system –validation of the data –any necessary refinement before it can be processed u the Central Transform includes: –main processing of the refined data –any necessary calculations, etc. u output activities are known as the efferent (going out) processes and include: –formatting the output –producing the output (displaying, printing, writing to file...)

8 8 © University of Sunderland Step 1a (contd) u identify the central transform either by examining the DFD or by pruning away the afferent and efferent processes: - trace each input flow from the outside of the DFD towards the middle, stopping at the point where the data has not yet been used for processing - trace each output flow backwards from the outside of the DFD to the middle, stopping at the point where the output data has just been produced - mark the region of the DFD between these 2 points (the region must contain at least 1 process)

9 9 © University of Sunderland Step 1b - Control Function u step 1b is to add a control function - we simply draw a new upper rectangle (the control function) above the central transform

10 10 © University of Sunderland Step 2 - Intermediate Diagram u step 2 is to draw the first new diagram (known as the intermediate diagram) making 3 changes to the annotated DFD: a) redraw the process boxes as rectangles b) re-route the data flows: any data flows which crossed the boundary of the central transform are re-routed via the new control function any data flows which crossed the boundary of the central transform are re-routed via the new control function c) empty the central transform: any processes within the central transform slide down below it and are attached to it any processes within the central transform slide down below it and are attached to it

11 11 © University of Sunderland Step 3 - First Cut Structure Chart u step 3 is to redraw the intermediate diagram to produce the 2nd new diagram (known as the first-cut structure chart) making another 3 changes: a) give the control function a meaningful name describing the overall program (in C this control function will represent “main”, but it should NOT be given this name on the diagram) b) remove the central transform if it only has one process hanging from it (i.e. in VB or C it only invokes a single procedure or function), otherwise redraw it as a rectangle

12 12 © University of Sunderland Step 3c - Altering all the Lines c) alter all the lines on the intermediate diagram: (i) remove any dangling lines (ii) draw straight lines with arrowheads from the bottom of upper modules to the top of lower ones (iii) change the curved lines into small arrows with names, representing data passed between modules your DFD is now transformed into a first-cut structure chart.


Download ppt "1 © University of Sunderland IMSE Lecture 4 u so far all our structure charts have been produced from an English description, e.g. - night on the town."

Similar presentations


Ads by Google