Given the following CUSTOMER file,
Name |
Balance |
Credit-Limit |
Jones Smith Lopez Black |
900 800 1,500 1,700 |
18,000 21,000 19,000 25,000 |
consider the following unstructured process specification:
For each customer in the CUSTOMER file whose balance exceeds $1,000, print name and balance. However, if credit-limit exceeds $20,000, print name, balance and credit-limit.
This specification contains an ambiguity, which gives rise to multiple interpretations of its meaning. Below, you will find two different ways of structuring (i.e. interpreting) the above ambiguous specification. For each version, execute it and write down (under “Result”) what the actual result would look like.
|
Structured English |
Result |
1
|
FOR EACH record in tbl-customer
ENDFOR |
Name Balance Credit-Limit
|
2
|
FOR EACH record in tbl-customer
ENDFOR |
Name Balance Credit-Limit
|