Question: Number 10.13 please Exercises 453 a SE 8 Interfaces) Why is it useful to be able to add static methods to interfaces? a SE 9
Exercises 453 a SE 8 Interfaces) Why is it useful to be able to add static methods to interfaces? a SE 9 Interfaces) Why is it useful to be able to add private methods to interfaces? (Payroll System Modification) Modify the payroll system of Figs. 10.4-10.9 to include e instance variable bfrthDate in class Employee. Use class Date of Fig. 8.7 to represent an em- o.11 Java aua 10.12 erwai birthday. Add get methods to class Date. Assume that payroll is processed once per month. ployesarra of Emp loyee variables to store references to the various employee objects. In a loop. payroll for each Employee (polymorphically), and add a $100.00 bonus to the person's alcaiamount if the current month is the one in which the Employee's birthday occurs. Shape Hierarchy) Implement the Shape hierarchy shown in Fig. 9.3. Each Two- IShape should contain method getArea to calculate the area of the two-dimensional Dimensiona1Shape should have methods getArea and getVolume to calculate the Each Three shape. urface area and volume, respectively, of the three-dimensional shape. Create a program that uses e references to objects of each concrete class in the hierarchy. The program should nt a text description of the object to which each array element refers. Also, in the loop that pro- coss allthe shapes in the array, determine whether ermine whether each shape is a TwoDimensional Shape or a cesses mensiona 1 Shape. If it's a TwoDimensionalShape, display its area. If it's a ThreeDimension alShape, display its area and volume. 10.15 (Payrol System Modification) Modify the payroll system of Figs. 10.4-10.9 to include a dirional Employee subclass Pieceworker that represents an employee whose pay is based on th umber of pieces of merchandise produce arables wage (ta stora th d. Class PieceWorker should contain private instan
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
