Академический Документы
Профессиональный Документы
Культура Документы
)
JH2P, Ch.10 Exercises
10.11
(Accounts Payable System Modification) In this exercise, we modify the accounts payable
application of Fig. 10.11, Fig. 10.15 to include the complete functionality of the payroll
application of Fig. 10.4,Fig. 10.9 (in Lab 9). The application should still process two Invoice
objects, but now should process one object of each of the four Employee subclasses. If the object
currently being processed is a BasePlusCommissionEmployee, the application should increase
the BasePlusCommissionEmployee's base salary by 10%. Finally, the application should output
the payment amount for each object. Complete the following steps to create the new application:
/**************************************************************************
* (C) Copyright 1992-2005 by Deitel & Associates, Inc. and *
* Pearson Education, Inc. All Rights Reserved. *
* *
* DISCLAIMER: The authors and publisher of this book have used their *
* best efforts in preparing the book. These efforts include the *
* development, research, and testing of the theories and programs *
* to determine their effectiveness. The authors and publisher make *
* no warranty of any kind, expressed or implied, with regard to these *
* programs or to the documentation contained in these books. The authors *
* and publisher shall not be liable in any event for incidental or *
* consequential damages in connection with, or arising out of, the *
* furnishing, performance, or use of these programs. *
*************************************************************************/
System.out.println(
"Invoices and Employees processed polymorphically:\n" );
/**************************************************************************
* (C) Copyright 1992-2005 by Deitel & Associates, Inc. and *
* Pearson Education, Inc. All Rights Reserved. *
* *
* DISCLAIMER: The authors and publisher of this book have used their *
* best efforts in preparing the book. These efforts include the *
* development, research, and testing of the theories and programs *
* to determine their effectiveness. The authors and publisher make *
* no warranty of any kind, expressed or implied, with regard to these *
* programs or to the documentation contained in these books. The authors *
* and publisher shall not be liable in any event for incidental or *
* consequential damages in connection with, or arising out of, the *
* furnishing, performance, or use of these programs. *
*************************************************************************/