21.08.2013 Views

Software Engineering for Students A Programming Approach

Software Engineering for Students A Programming Approach

Software Engineering for Students A Programming Approach

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

116 Chapter 9 ■ Data flow design<br />

central and most important bubble is the check bubble. We take this to be the main,<br />

most important component. Imagine that we can touch and move the objects within<br />

the diagram. Suppose that the bubbles are joined by pieces of string. Grasp the central<br />

component and lift it into the air. Let the other bubbles dangle beneath. Next change<br />

the bubbles into rectangles. We now have a structure chart that looks like Figure 9.7.<br />

Each box is a software component. The components communicate by calls from<br />

higher components to lower components. The data that flowed along lines in the data<br />

flow diagram is now passed as parameters to and from the various components.<br />

The check component calls the convert component which in turn calls the read<br />

data component to obtain data. Then it calls the display message component to<br />

display the output on the screen.<br />

As we have illustrated, the steps <strong>for</strong> converting a data flow diagram into a structure<br />

chart are:<br />

1. identify the most important bubble (trans<strong>for</strong>mation)<br />

2. convert this into the top-level component in the structure chart<br />

3. allow the other components to dangle beneath the top-level component, creating<br />

a hierarchical tree<br />

4. convert the bubbles into rectangles and the data flows into lines representing<br />

method calls.<br />

The patient monitoring example illustrates how to use the data flow design method.<br />

But the example chosen is simple and we have deliberately avoided drawing attention<br />

to complications. Data flow diagrams typically have tens of bubbles and can be quite<br />

complex. Often there are several input and output data flows. In more complex diagrams,<br />

it can be difficult to identify a single center of the diagram.<br />

Notice that although the method leads us to a structure <strong>for</strong> a piece of software that<br />

is expressed in terms of well-defined, independent components, we still have to design<br />

the detail of each and every component; we have to carry out the low-level or detailed<br />

design. This emphasizes that data flow design is a method <strong>for</strong> high-level or architectural<br />

design.<br />

convert<br />

read<br />

data<br />

check<br />

Figure 9.7 Structure chart <strong>for</strong> patient monitoring software<br />

display<br />

message

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!