
This project depends upon material from Chapters 1-6 of the textbook.
Let us suppose that you now have more customers for the software you wrote for project 2. They include companies that have both salaried and hourly employees. Also, you have discovered that Ada provides a nice approach to generalizing software. To reflect these changes, modify the software you wrote for project 2 in the following ways:
1. First, you are to replace the Tables package with the generic version of the package, Tables_Generic, program 5.19, specification, and program 5.20, body, in the textbook. You must write the code for all of the unfinished subprogram bodies in the package. Note that this package body uses an ordered array implementation of the table.
2. Next, modify the packages Our_Employees and Our_Employees.IO so that the Employee record is a variant record specifying two kinds of employees, those whose pay is stated as an annual salary, and those who earn an hourly wage. The type definitions for this new record are shown below:
TYPE Categories IS (Salaried, Hourly);
TYPE Employee(Category: Categories := Salaried) IS RECORD
Name: String(1..15);
ID: Integer;
Start_Date: Dates.Date;
CASE Category IS
WHEN Salaried =>
Salary: Currency.Quantity;
WHEN Hourly =>
Hourly_Rate: Currency.Quantity;
END CASE;
END RECORD;
Your modified package will contain two constructor functions, Make_Hourly_Employee and Make_Salaried_Employee. Your selector function to extract salary will compute the annual salary for hourly employees, assuming 40 hours per week, and 52 weeks per year.
3. Modify the interactive user interface program so that it uses the new employees package and the new tables package. The "P" function should print a report of all employee records. The bonus amount should also be listed for each employee. The above average or below average marker included in the previous two projects should be omitted.
There is no need for a batch program this time.