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.
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:
The Terminate Processing Transaction Center typically controls one or more of the following primitive processes:
The Main Processing Transaction Center typically controls one or more of the following primitive processes:
____________
| 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 |
|___________|
These will be provided in class.
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.
Return to the
List of Activities