Question
In this C# lab assignment , we modify the payroll application. If the object currently being processed is a BasePlusCommissionEmployee, the application should increase the
In this C# lab assignment , we modify the payroll application. If the object currently being processed is a BasePlusCommissionEmployee, the application should increase the BasePlusCommissionEmployees base salary by 10%. Complete the following steps to create the new application: a) Modify classes HourlyEmployee and CommissionEmployee to place them in the IPayable hierarchy as derived classes of the version of Employee that implements IPayable. [Hint: Change the name of method Earnings to GetPaymentAmount in each derived class.] b) Modify class BasePlusCommissionEmployee such that it extends the version of class CommissionEmployee created in Part a. c) Modify PayableInterfaceTest to polymorphically process three salariedEmployee, two HourlyEmployee, one CommissionEmployee and two Base- PlusCommissionEmployee. d) Create a menu that allows a user to select one of the following options to display a string representation of each IPayable objects.
Sort last name in descending order using IComparable
Sort pay amount in ascending order using IComparer
Sort by social security number in descending order using a selection sort and delegate
Sorting last name in ascending order and pay amount in descending order by using LINQ
Use the following data to test your program:
IPayable[] payableObjects = new IPayable[ 8 ]; payableObjects[ 0 ] = new SalariedEmployee( "John", "Smith", "111-11-1111", 700M ); payableObjects[1] = new SalariedEmployee("Antonio", "Smith", "555-55-5555", 800M); payableObjects[2] = new SalariedEmployee("Victor", "Smith", "444-44-4444", 600M); payableObjects[ 3 ] = new HourlyEmployee( "Karen", "Price", "222-22-2222", 16.75M, 40M ); payableObjects[4] = new HourlyEmployee("Ruben", "Zamora", "666-66-6666", 20.00M, 40M); payableObjects[ 5 ] = new CommissionEmployee( "Sue", "Jones", "333-33-3333", 10000M, .06M ); payableObjects[ 6 ] = new BasePlusCommissionEmployee( "Bob", "Lewis", "777-77-7777", 5000M, .04M, 300M ); payableObjects[7] = new BasePlusCommissionEmployee("Lee","Duarte", "888-88-888", 5000M, .04M, 300M);
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started