ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 20 May 2017 My Price 9.00

Modify classes HourlyEmployee and CommissionEmployee

Program in C#
Modify the payroll application. If the object currently being processed is a BasePlusCommissionEmployee, the application should increase the BasePlusCommissionEmployee’s base salary by 10%. 

Complete the following steps to create the new application:

a) Modify classes HourlyEmployee and CommissionEmployee (Fig. 12.7) 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.

  1. Sort last name in descending order using IComparable
  2. Sort pay amount in ascending order using IComparer
  3. Sort by social security number in descending order using a selection sort and delegate

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);

Return the following documents

  • - main method
  • - code on sorting by social security number in descending order using selection sort and delegate
  • - code on sorting by last name in descending order
  • - run time output sorting by pay amount in ascending order
  • - UML diagram

Attachments:

Answers

(11)
Status NEW Posted 20 May 2017 11:05 AM My Price 9.00

-----------

Attachments

file 1495281237-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)