Main()

float *students, *tests, *assns
1. Show page table

Load( students, "students" )
3. Show page table

Load( assns, "assigments" )
5. Show page table

Load( tests, "tests" )
7. Show page table

Print( students )
9. Show page table

Calc( students, assns, tests)
11. Show page table

Print( students )
13. Show page table

Exit

Load( &Array, Fname )

Open Fname

// Read file header info
count = read( Fname )

recsize = read( Fname )

// Allocate memory to hold records to be read in.
// allocate is function external to program's frames.

allocate( Array, count*recsize )

//Real memory frame used while loading
While ( Not = EOF )
    Read from Fname into Array
    Next
EndWhile

2. & 4. & 6. Show page table

Return

Print( &Array )

For all entries in Array
    Stylishly print entry
EndFor

8. & 12. Show page table

Return

Calc( &students, &assns, &tests )

t_assn = 0, t_test = 0

For each stu_id in students // Access students array
Do
  Foreach assn(stu_id); // Access assns array
    t_assn += assn;
  Done

  students[stu_id].assn = t_assn // Access students array

  For each test in tests(stu_id) // Access tests array
  Do
    t_test += test;
  Done

  students[stu_id].test = t_test // Access students array

Done

10. Show page table