13.07.2015 Views

Software Design 2e - DIM

Software Design 2e - DIM

Software Design 2e - DIM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

14.3.3 Step 3: List the operations and allocate to program elementsAgain, the nature of the chosen example is such that this is a relatively simple taskto perform. Since most requirements place their emphasis on describing the outputsthat are to be produced from a system, it may well be better to begin this task by consideringthe outputs first, and then using these to identify the necessary inputs andalgorithmic operations. However, there seems to be no hard and fast rule about howthis should be done, nor any direct way of checking for completeness.For the filling-station system, the operations involved are the following:Outputs (1) write pump identity(2) write volume of fuel(3) write cost to customerInputs (4) obtain pump identity(5) obtain volume of fuel(6) obtain type of fuel(7) multiply type price per unit by volume dispensed299The JSP processOnce again, the exercise of adding page headers and pagination to the output is left forthe reader to consider.These operations are then allocated to the elements in the program StructureDiagram, as shown in Figure 14.8 (the operations are shown as small numberedboxes). Note that it is only meaningful to attach an operation to a box at the base ofany branch of the Structure Diagram, since higher levels within the diagram ‘tree’ areessentially abstractions of the base levels.Figure 14.8The filling-station program: allocation of operations to program elements.

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

Saved successfully!

Ooh no, something went wrong!