Unit 5.7 - Introduction to Database-Like Problems

PROG


Given a Table
element#PartNoCustomerNoQuantity
1...
2...


A Price Table
element#Price
..
..
..


A Customer Table
element#Total
..
..
..

Update the Customer Tables with the Price

CONCEPTS

When the "key" is a small integer, we can use the subscripting mechanism

PSEUDOCODE

  1. read in price table
  2. zero out totals
  3. compute customer totals
  4. print customer totals
Refinement for Step 3

for each transaction