Software Engineering for Students A Programming Approach

Software Engineering for Students A Programming Approach Software Engineering for Students A Programming Approach

web.firat.edu.tr
from web.firat.edu.tr More from this publisher
21.08.2013 Views

9.2 Identifying data flows 113 Notice again the essential components – data flows (lines) and functions (bubbles). Each line is labeled to describe exactly what data it is. Each bubble is labeled with a verb to describe what it does. We could go on redrawing our data flow diagram for the chef in the kitchen, adding more and more detail. There are, for example, other ingredients, like tomatoes to consider (data flows) and more detailed actions (bubbles), such as mixing in the various ingredients. We started with a single, high-level diagram in which all the detail was hidden. We end with a richer, more detailed diagram in which the components of the system (and their interrelationships) are revealed. In a computer system, the bubbles correspond to the software components. We have created a design for the kitchen system expressed in terms of components and the flows of data between the components. 9.2 ● Identifying data flows We will use as a case study the design of software to monitor a patient in a hospital. The specification (Appendix A) for the software is: A computer system monitors the vital signs of a patient in a hospital. Sensors attached to a patient send information continually to the computer: ■ heart rate ■ temperature ■ blood pressure Some of the readings require conversion to useful units of measurement (e.g. micro volts into degrees centigrade). The computer displays the information on a screen. It also logs the information in a file that can be retrieved and displayed. If any of the vital signs exceeds safe limits, the screen flashes a warning and an alarm sounds. The limits have default values, but can also be changed by the operator. If a sensor fails, the screen flashes a warning and the alarm sounds. The data flow diagram of the major data flow for this software is shown in Figure 9.3. It is straightforward to draw this diagram simply by reading the specification closely and picking out the functional steps that need to be carried out. This diagram also shows some data stores. These are drawn as open boxes and represent files or databases. The difference between a data store and a data flow is that a data store is static (it does not move). Drawing the data flow diagram for a proposed piece of software is a vital step in the method. How do we do it? There are three alternative approaches. Method 1 is to start with a single bubble like Figure 9.4 that shows the overall function of the software and its input and output data flows. We then refine the bubble, or break it down, into a set of smaller bubbles like Figure 9.5. We continue redrawing bubbles as sets of smaller ones until we can’t do it any more. In method 2 we start with the output data flow from the system and try to identify the final transformation that has to be done to it. Then we try to identify the transformation before that, and so on, until we have a complete diagram.

114 Chapter 9 ■ Data flow design raw data converted data status information data read data convert check display message message Figure 9.3 Data flow diagram for patient monitoring software input data flow Figure 9.4 Initial data flow diagram input data flow function A Figure 9.5 Refined data flow diagram overall function data flow conversion factors function B safe limits output data flow output data flow

114 Chapter 9 ■ Data flow design<br />

raw<br />

data<br />

converted<br />

data<br />

status<br />

in<strong>for</strong>mation<br />

data<br />

read<br />

data<br />

convert<br />

check<br />

display<br />

message<br />

message<br />

Figure 9.3 Data flow diagram <strong>for</strong> patient monitoring software<br />

input<br />

data<br />

flow<br />

Figure 9.4 Initial data flow diagram<br />

input<br />

data<br />

flow<br />

function<br />

A<br />

Figure 9.5 Refined data flow diagram<br />

overall<br />

function<br />

data<br />

flow<br />

conversion<br />

factors<br />

function<br />

B<br />

safe<br />

limits<br />

output<br />

data<br />

flow<br />

output<br />

data<br />

flow

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

Saved successfully!

Ooh no, something went wrong!