9.14 cant compile keep getting class interface or enum expected
s BUL he first state- (USInS hod's Body) Explain why you would use super in the body constru ubclass constructor Explain Uising super in am Instance get Methods in a ent of a of a subclass's instance method 9.13 (Calling get Method d Class's Body) In Figs. 9.10-9.11 methods earnings and to- methods within the same class. Explain the benefits of call Body ach call various get ing these get methods within the classes. urchy) In this chapter, you studied an inheritance hierarchy in wh 4 (Employee usomissionEmployee inherited from class CommissionEmployee. However, not al moloyes are CommissionEmployees. In this exercise, you'll create a more employes are BasePlusCommissi ionEmployees. In this exercise, you ll create a more general Employee superclass he attributes and behaviors in class CommissionEmployee that are common to all En- rtors out t The common attributes and behaviorsEmployees are firstName, lastName totring. Create a new superclass Employee that contains these instance variables and meth that r, getFirstName, getLastName, getSocialSecurityNumber and a portion of socialSecurityNumber nchod ds and a constructor. Next, rewrite class C ommi ss i onEmployee from Section 9.4.5 as a subclass of Em ployee Class CommissionEmployee should contain only the instance variables and methods that are nor decdared in superclass Employee. Class CommissionEmployee's constructor should invoke class Em ployees constructor, and CommissionEmployee's toString method should invoke Employee's to- String method. Once you've completed these modifications, run the CommissionEmployeeTest and asePlusComissionmp loyeeTest apps using these new classes to ensure that the apps still display the ne rouls for a CommissionEmployee object and BasePlusCommissionEmployee object, respectively. Creaing a New Subclass of Employee) Other types of Employees might include Salaried- ses who get paid a fixed weekly salary, PieceWorkers who get paid by the number of pieces prod bout or HourlyEmployees who get paid an hourly wage with time-and-a-half-1.5 times the wage-for hours worked otar 0