                                   (* Chapter 16 - Program 6 *)
program Employee;

{$R+}

uses Person, Supervsr;

var staff : array[1..10] of ^Person_ID;
    Sup   : ^Supervisor;
    Prog  : ^Programmer;
    Sec   : ^Secretary;
    Index : integer;

begin

   for Index := 1 to 10 do
      staff[Index]^.Init;

   WriteLn('XYZ Staff assignments.');
   WriteLn;

   new(Sup);
   staff[1] := Sup;
   Sup^.Init('Big John', 5100, 'President');

   new(Prog);
   staff[2] := Prog;
   Prog^.Init('Joe Hacker', 3500, 'Pascal');

   new(Prog);
   staff[3] := Prog;
   Prog^.Init('OOP Wizard', 7700, 'OOP Pascal');

   new(Sec);
   staff[4] := Sec;
   Sec^.Init('Tillie Typer', 2200, True, 85);

   new(Sup);
   staff[5] := Sup;
   Sup^.Init('Tom Talker', 5430,'Sales Manager');

   new(Prog);
   staff[6] := Prog;
   Prog^.Init('Dave Debug', 5725, 'Assembly Language');

   for Index := 1 to 6 do
      staff[Index]^.Display;

end.




(* Result of execution

XYZ Staff assignments.

Big John is the president and makes $5100 per month.
Joe Hacker specializes in Pascal and makes $3500 per month.
OOP Wizard specializes in OOP Pascal and makes $7700 per month.
Tillie TYper can type 85 words per minute.
Tom Talker is the Sales Manager and makes $5430 per month.
Dave Debug specializes in Assembly Language and makes $5725 per month.

*)
