Page 273 -
P. 273

240     part 3  •  the analysis proCess

              Figure 9.5
              Data structure for a shipping
                                                                Shipping Statement =
              statement for World’s Trend.                                      Order Number +
                                                                                Order Date +
                                                                                Customer Number +
                                                                                Customer Name +
                                                                                Customer Address +
                                                                               5
                                                                               1 {Order Item Lines} +
                                                                               Number of Items +
                                                                               Merchandise Total +
                                                                               (Tax) +
                                                                               Shipping and Handling +
                                                                               Order Total
                                                             Customer Name =
                                                                              First Name +
                                                                              (Middle Initial) +
                                                                              Last Name
                                                             Address =
                                                                              Street +
                                                                             (Apartment) +
                                                                             City +
                                                                             State +
                                                                             Zip +
                                                                             (Zip Expansion) +
                                                                             (Country)
                                                           Order Item Lines =
                                                                            Item Number +
                                                                            Quantity Ordered +
                                                                            Quantity Backordered +
                                                                            Item Description +
                                                                            Size Description +
                                                                           Color Description +
                                                                           Unit Price +
                                                                           Extended Amount






                                         A STRUCTURED ENGLISH EXAMPLE.  The following example demonstrates how a spoken
                                         procedure for processing medical claims is transformed into structured English:
                                             We process all our claims in this manner. First, we determine whether the claimant has
                                             ever sent in a claim before; if not, we set up a new record. The claim totals for the year
                                             are then updated. Next, we determine if a claimant has policy A or policy B, which differ
                                             in deductibles and copayments (the percentage of the claim claimants pay themselves).
                                             For both policies, we check to see if the deductible has been met ($100 for policy A and
                                             $50 for policy B). If the deductible has not been met, we apply the claim to the deductible.
                                             Another step adjusts for the copayment; we subtract the percentage the claimant pays
                                             (40 percent for policy A and 60 percent for policy B) from the claim. Then we issue a
                                             check if there is money coming to the claimant, print a summary of the transaction, and
                                             update our accounts. We do this until all claims for that day are processed.

                                             In examining the foregoing statements, we notice some simple sequence structures, particu-
                                         larly at the beginning and end. There are a couple of decision structures, and it is most appropri-
                                         ate to nest them, first by determining which policy (A or B) to use and then by subtracting the
                                         correct deductibles and copayments. The last sentence points to an iteration: Either DO UNTIL
                                         all the claims are processed or DO WHILE there are claims remaining.
                                             Realizing that it is possible to nest the decision structures according to policy plans, we can
                                         write the structured English for the foregoing example (see Figure 9.4). As we begin to work
                                         on the structured English, we find that some logic and relationships that seemed clear at one
   268   269   270   271   272   273   274   275   276   277   278