Virtual and pure virtual methods

The idea here is to create a simple payroll system. You need a base class Employee, and you need to create two derived classes. One for Faculty and one for Staff. In the input all faculty lines start with ':', and have the name and salary. The staff lines start with '-', and have name, hours, and hourly pay.

I want you to read the input and parse based on the type. Then store the data in list. When all of the input is done, sort the list, and output the payroll info.

The idea here is that when you build the list it is of type Employee pointer, since all the methods will be virtual, they will still execute correctly base on the correct subtype being pointed to.

Have the program read from stdin.

Here is a sample input file
Here is a sample run from my program

This is due on February 25th.

The Goals

NOTE : I switched the storage from vector to list.