A number of tools and techniques are available to computer programmers and systems analysts to assist in developing computer programs and applications, in this unit, some of the more traditional tools and techniques are covered. They include print and layout charts, screen layout charts, flowcharts, decision tables, and grid charts.
- Screen Layout Charts
A number of forms have been developed to make it easier to specify in detail the input and output from a computer application. A print chart is used to describe the format of an output report from a printer. A card layout chart is used to describe how input data is placed on one or more computer cards. Different companies and data processing departments might use slightly different forms. In addition, there are other charts and forms that describe the exact layout or positioning of data on magnetic tape, disk, and the display terminal or CRT.
During the last decade, more and more companies have started using terminals or CRTs to perform data input instead of computer cards and card readers. Because of this, there is a greater emphasis on the use of screen layout charts rather than the traditional card layout charts. The purpose of a screen layout chart is to reveal what information and data is to be displayed on the screen during processing. The screen layout chart reveals both data to be entered into the computer as well as the information and data to be displayed on the terminal device. For some applications, there may be 100 or more different screens that can appear on the display terminal. To perform an adequate job during design and system documentation, screen layout charts should be developed for every possible screen that can appear on the display terminals.
Screen layout charts can take on a number of different forms, depending upon the detail that is to be displayed on the chart. General screen layout charts reveal an overview of what is to be displayed on the screen. A detailed screen layout chart reveals in detailed fashion what information is to be displayed on the display terminal. Screen layout charts can be done by hand or by using preprinted forms.
Like a road map, flowcharts are used to reveal how to go from a starting point to the final destination and can be used to display any amount of detail. In developing application software, a general chart to reveal the overall purpose and structure of the application is needed.
This is usually called the system flowchart or application flowchart. More detailed flowcharts are also needed that reveal how each program is to be developed. This type of flowchart is called a program flowchart.
Both system and program flowcharts are drawn using a special flowcharting template, which contains a set of symbols needed in developing flowcharts. System flowcharts are some symbols are used for both system and program flowcharts, while other symbols are fairly specialized. Some of the commonly used system flowcharting symbols are presented in Fig. 21.1.
Fig 21.1 Flowcharting Templates
These system flowchart symbols are used to reveal, in a general fashion, the relationships among the input data, the programs, and the desired output. For example, most realistic payroll applications require multiple computer programs interacting with multiple data files. A simplified system flowchart for a payroll application is displayed in Fig. 21.2.
Fig. 21.2 System flowcharts for a simplified payroll application
The payroll application shown in Fig. 2 includes an update routine (symbols 1-6), an audit routine (symbols 7-11), the payroll program (symbol 12), the checks (symbol 13), the posted master file (symbol 14), and a summary routine (symbols 15-17). Most payroll applications are more complex and involved. For example, federal and state income tax withholding statements must be prepared for each employee. These forms must then be sent to all employees to enable them to fill out their state and federal income tax forms each year.
Furthermore, most payroll applications generate additional reports. One manager might want a report containing all employees working overtime this week, and another manager might want a report listing all employees qualified to perform certain jobs. These and similar reports and outputs become a part of the payroll application.
3.2.2 Program flowcharts
Once the system flowcharts have been developed, the next step is to design and structure the computer programs. Like blueprints of a building, program flowcharts reveal in detail how the program is to be built. Program flowchart symbols are used to show activities to be performed. The flowcharting template shown in Fig. 1 is used.
A flowchart for a payroll program (refer to symbol 12 in Fig. 2) can be developed. This program should read from the updated master file and the edited transactions file. It should write checks, update the master files, and prepare a summary report. In both program and system flowcharts, there can be various levels of detail. A flowchart that shows less detail is a macro flowchart, while a flowchart with more detail is a micro flowchart, or detailed flowchart.
While programmers and system analysts have a good deal of freedom in creating flowcharts, there are a number of general rules and guidelines recommended by the American National Standards Institute (ANSI) to help standardize the flowcharting process. Various computer manufacturers and data processing departments usually have similar flowcharting standards. Some of these rules and guidelines are:
- Go from left to right and top to bottom in constructing flowcharts.
- When a reference for a symbol is needed, it should be placed above the symbol.
- If a new flowcharting page is needed, it is recommended that the flowchart be broken at an input or output file.
- Use an annotation symbol when a more detailed explanation is needed.
- Words in the flowchart symbols should be common English words and easy to understand.
- Maintain a consistent level of detail for a given flowchart.
- Keep the flowchart as simple as possible and try to avoid flowcharting lines that cross or loop.
- Be consistent in using names and variables in the flowchart.
Flowcharting books and manuals have been developed by various organizations. While these specific rules are beyond the scope of this course, good flowcharting procedures require they be followed.
3.2.3 Problems with Flowcharts
Flowcharts were originally developed to help programmers and analysts design and document computer programs. As programs became larger, the use of flowcharts became more difficult to implement. New software has emerged over the last decade to facilitate programming. This includes Visio, a software program exclusively designed for flowcharting, as shown in Fig. 21.33.
Fig 21.3: Flowcharting software (Visio)
As a result, many organization are now reducing the amount of flowcharting used. In its place, internal documentation, decision tables, grid charts, and structured design methodologies are used. With internal documentation, the purpose and functioning of the program is actually contained within documentation statements in the particular programming language. Depending on the language, these are called remark statements, comment statements, or documentation statements. Decision tables and grid charts are discussed later in this unit.
3.2.4 Decision Tables
A decision table can be used as an alternative or as an addition to flowcharts. The objective of both decision tables and flowcharts is the same. They reveal how the input data is to be manipulated to obtain the desired output. As the name implies, decision tables reveal what decisions or actions the computer is to take as a result of the input data. When the computer has to make a large number of decisions or if there are a large number of different branches within a program, decision tables are particularly useful. In these cases, decision tables are preferred to flowcharts.
In general, a decision table displays the different conditions that could exist and the different actions that the computer should take as a result of these conditions. Most decision tables have six parts. A complete decision table for the airline reservation application is given in Fig. 21.4.
Fig. 21.4: Decision table for the airline reservation application
The first part of the decision table contains the name and/or number of the table. For some of the larger applications, two or more decision tables are used in the analysis part of program development. For the computer program developed to make airline reservations, the decision table is called the airline reservation application. This appears at the upper left of the table.
The second part of the table contains the condition statements, which describe the conditions that could exist with the input data. If the computer program is to make tourist and first-class reservations, there may be four possible states or conditions: (1) a first-class reservation is requested, (2) a tourist-class reservation is requested, (3) a first-class seat is available, and (4) a tourist-class seat is available, These conditions are then listed in the second area of the decision table.
The third part of the decision table contains the action statements. While the condition statements reveal the possible states of the input data, the action statements describe the possible actions of the computer system. Given the conditions discussed above, what types of actions might the computer take? Most airline reservation systems will either issue a first-class ticket, wait list a passenger for a first-class ticket, issue a tourist-class ticket, or wait list a passenger for a tourist class ticket.
The right- hand side of the decision table contains the rule numbers (part 4), the actual conditions (part 5), and the actions taken by the computer (part 6). Each column indicates what the computer should do as result of certain conditions. Four columns correspond to the four rule numbers. Under each rule number is a given condition followed by a specific action to be taken by the computer. The four rule numbers, the four actual conditions, and the associated actions taken by the computer system are discussed below.
- Rule 1: A first-class ticket is requested, and a first-class seat is available. The computer should issue a first-class ticket.
- Rule 2 : A first-class ticket is requested, but a first-class seat is not available. The computer should wait list the passenger.
- Rule 3: A tourist-class ticket is requested, and a tourist-class seat is available. The computer should issue a tourist-class ticket.
- Rule 4: A tourist-class ticket is requested, but a tourist-class seat is not available. The computer should wait list the passenger.
In the decision table, “Y” means yes, “N” means no, and “X” means the computer should take this action.
3.2.5 Grid Charts
Application programs are usually complex and interrelated in business. The same data may be used for several programs, and the output from one program may be the input to another. A grid chart is an excellent method to reveal the relationships between application programs. What data is used for several application programs? What data is used to produce different reports and documents? For which applications is the output from one application used as input for another application? These and similar questions can be answered using grid charts. For example, the same inventory data may be used in several application programs. See the example in Fig. 21.5
Fig. 21.5: The use of grid charts
The Xs in the grid chart in Fig. 21.5 reveal what data is used for each application program. Look at the first column. The invoice application uses the item name, code number, and price. Likewise, the data used in any of the application programs listed in the grid chart can be found by reading down the appropriate column. In what applications is the reorder point data used? Going across the reorder point row, it can be seen that this data is used in the inventory reorder program and the master file program
Many traditional system design schemas, typical of the waterfall design described in SDLCs in earlier units are still employed to put thoughts to paper. Print charts, screen charts, and layout charts are used to reveal the exact layout and format of input data and output reports and documents. Both flowcharts and decision tables are used to display how the input data is to be manipulated to obtain the desired output. System flowcharts give the overall structure of the application while program flowcharts reveal how each individual program is to be written or constructed. In addition, micro- or detailed flowcharts can be used to reveal in detail how a computation or process is to be performed.