417 ACTIVITY 21: Program Design Using Structure Charts

WHY:

This activity is designed to help review the design of modular programs and introduce the concept of structure charts. When building a structure chart, we look for on-line transaction centers which route data to two or more processes. These are often found by examining the menu system you developed in Activity 23. We will not actually design programs for the project in this course, but you may well be called on to do this in your later work as a systems analyst.

LEARNING OBJECTIVES:

  1. Discover how to identify transaction centers in a system.
  2. Discover how to draw a structure chart representing the on-line transaction centers.
  3. Understand how group roles enhance group learning.

PERFORMANCE CRITERIA:

  1. Quality of the answers to the Critical Thinking Questions.
  2. Diligence with which each member of the team performed her role.

RESOURCES:

  1. Chapter 15, Systems Analysis and Design Methods
  2. 30 minutes

MODEL:

The following transaction centers illustrate a modular approach to designing a process called "Produce Accounts Receivable Report":

     
     At the highest level, there are three transaction centers for this 
     report generation program.  They are:
          Initiate Processing
          Main Processing
          Terminate Processing
     The Initiate Processing transaction center has three sub-transaction centers:
          Print Account Headings
          Initialize Accounts Receivable Accumulators
          Get First Account Record
     The Terminate Processing transaction center has two sub-transaction centers:
          Print Account Summary Totals
          Close Files
     The Main Processing transaction center has three sub-transaction centers:
          Prepare for first account transaction
          Process account transactions/update totals
          Get Next Account Record
     The Prepare for first account transaction has two sub-transaction centers:
          Print Account General Information
          Get First Transaction
     Process account transactions/update totals has four sub-transaction centers:
          Update Accumulators
          Calculate charges/new balances
          Print detail line
          Get Next Transaction

Using the above transaction center breakdown it is easy to prepare the following structure chart. Note the data that passes back and forth among the processes in the chart. These data flows represent the parameters which must be passed back and forth between the function modules after they are coded. Note that EOAF stands for End of Account Flag.

The Initiate Processing Transaction Center typically controls one or more of the following primitive processes:

  1. Building and loading Tables (set up array and load data into the array)
  2. Defining constants and Accumulators
  3. Opening files
  4. File merging or sorting
  5. Displaying the first menu and accepting the first choice from that menu
  6. Get first input record

The Terminate Processing Transaction Center typically controls one or more of the following primitive processes:

  1. Calculating Control Totals
  2. Printing Control Totals
  3. Closing files

The Main Processing Transaction Center typically controls one or more of the following primitive processes:

  1. Editing input records
  2. Getting a secondary record (i.e., read data from a file other than the main one being processed.)
  3. Perform calculations
  4. Making decisions
  5. Accumulating totals
  6. Writing a Detail Line
  7. Writing a complete report
  8. Getting the next record
  9. Redisplaying a menu

Structure Chart:


				  ____________
				  | Produce  |
				  | Accounts |
				  |Receivable|
				  | Report   |
			/|\	  |__________|		 |
			 |		/|\		\|/
		First account record   / | \  Account Total		
		______________________/  |  \___________________
		|			 |			|
		|	   |		 |	/|\		|
		|	  \|/		 |	 |		|
		|	First acct record| Account Total	|
	________|______		_________|______	  ______|_______
 	|   Initiate  |		|     Main     |	  | Terminate  |
	| Processing  |		| Processing   |	  | Processing |
	|_____________|		|______________|	  |____________|
		/|\    /|\		|			/\
	       / | \	|		|	Account Total  /  \EOAF |
acct heading  /  |  \1st acct record	|		|     /    \   \|/
line  |	     /   |   \			|	       \|/   /      \
     \|/    /    |    \			|		    /	     \
___________/___	 |     \______________	|      ____________/_     ___\_____
|   Print     |	 |	| Open Files |	|      | Print      |     | Close |	
| account     |	 |  |	|  and get   |	|      | Account    |     | Files |
| headings    |	 | \|/	| first acct |	|      | Summary    |     |_______|
|_____________|  | A/R	| record     |  |      |____________|
		 | accum|____________|  |
		 | ulations		|
	    _____|________		|
	    | Initiate   |		|
	    | Accounts   |	 |     /|\	 	/|\
	    |receivable  |      \|/   / | \		 |
	    |accumulators|    Account/  |  \Next Account Record
	    |____________|    record/   |   \    
				   /    |    \
	   _______________________/     |     \__________________
	   |			     |	|			|
	   |        Account Record  \|/ |  Account totals	|
	   |	    			|	/|\		|
	   |	   Transaction record | |	 |		|
	   |			     \|/|			|
	   |				|			|
	___|___________		________|_______	  ______|_______
 	|  Initiate   |		|  Produce     |	  | Get next   |
	|acct record  |		|  account     |	  | acct record|
	|_____________|		| transaction  |	  |____________|
		/|		|   history    |	     
	       / |     /|\	|______________|		   /|\
  General acct/  |First |	  /\   \    \	   Next Transaction |
    line |   /   |Transaction    /  \   \    \______________________
	\|/ /	 |		/    \   \    			   |
	   /     |	  |    /   |  \   \ Transaction Detail |   |
	  /	 |	 \|/  /   \|/  \   \  Line	      \|/  |
	 /	 |   Trans.  /	   Trans\   \____________	   |
	/	 |   Accum. /	  amount \	  /|\	|	   |
       /	 |	   /		  \ Charge |	|	   |
______/____  	 |   _____/________    ____\_________   |   _______|_____
|  Print  |  	 |   |  Update    |    | compute    |   |   | Get next  |	
| account |  	 |   |  and get   |    |transaction |   |   |transaction|
| general |  	 |   | first acct |    | charge     |   |   |___________|
|  info   |   	 |   | record     |    |____________|   |
|________ |   	 |   |____________|  			|
		 |					| 
	    _____|________			    ____|________
	    | Get first  |			    |   Print   |
	    | transaction|	 		    |transaction|
	    |____________|      		    |   detail  |
						    |___________|

CRITICAL THINKING QUESTIONS:

These will be provided in class.

SKILL EXERCISES:

  1. Draw a structure chart representing the transaction center hierarchy in the following problem:

    An on-line program allows an end-user to perform inquiries to obtain information concerning customer accounts, orders, invoices, and products. The end-user is allowed to obtain general information concerming an order or information about specific orders that have been placed on back order. The end-user who wishes to obtain information concerning orders placed on back order may request information describing orders that have been backordered for less than a week, backordered for more than one week but less than two weeks, or backordered for more than a two-week period. The end-user may also perform inquiries to retrieve general information about a specific part and information concerning backordered parts.


Cpsc 417 Activity 21 -- Revised 11/10/98

Return to the List of Activities