The test program needs to create a StateTaxableWorker object and a LocalTaxableWorker object. The test program must contain a display method which takes a base class TaxableWorker object reference along with the number of hours worked by the worker. The display method should use the base class workerInfo method to get the name and tax information about the worker and output that information. The display method should also use the base class grossPay method to get the pay info for the worker and display that information. Then the display method should use the taxWithheld method to output the total amount of tax withheld for the worker.
The test program should pass the StateTaxableWorker object and the LocalTaxableWorker object to the display method along with the number of hours each worker has worked. The output seen should demonstrate polymorphic behavior, that is the base class TaxableWorker reference to a StateTaxableWorker object elicits StateTaxableWorker tax information and correct tax withheld, and the base class TaxableWorker reference to a LocalTaxableWorker object elicits LocalTaxableWorker tax information and correct tax withheld.
Re: Java Programming
Where particularly do you have problems? Please show us the code you've tried.