<<< Answer Key >>>> 4. 1. What attributes are the same between the Salaried and Hourly workers? name, SSN, exemptions, hours, wage Are there any that are different? No 4. 2. What methods are the same in name between the Salaried and Hourly workers? pay and toString 4. 3. Which methods do the same thing? Which methods do different things? pay is different, toString is the same 4. 8. How many individual statements or alterations did you need to add to SalariedWorker and HourlyWorker collectively? 8 (Two new attribute declarations, alteration of two Constructor headers, added code in each constructor, and a change to both toString methods) 4. 11. Did this change require any changes to your SalariedWorker class? No 5. 1. In which class are these located? Employee 5. 2. Are these attributes found anywhere in any of the other three classes? No 5. 3. Look at the SalariedWorkerV2.java class. Does it contain any attributes of its own? No 5. 4. What do you see that might "link" SalariedWorkerV2.java to the Employee.java class? extends Employee 5. 5. How about HourlyWorkerV2? Does it contain any attributes? Does it also link to the Employee.java class? No attributes, extends Employee 5. 7. In HRV2, do you see any objects of the "Employee" type? No 5. 8. In HRV2, we are building the more specific versions of Employee, the HourlyWorkerV2 and SalariedWorkerV2. Looking at the methods in Employee, what method does not exist in Employee.java that does exist in each of the two specializations? pay() 5.9 Does this make sense? Why or why not? Yes, pay was different and so should be different for the two classes. toString was the same. 6. 1. Where would you add this same field to your Employee.java family of classes? In Employee.java Where would you change the toString()? in Employee.java What constructors do you need to change? both the Hourly and Salaried? 6. 3. Does inheritance save you any coding? Yes What would you say are the advantages and disadvantages of using an inheritance structure for a related set of classes? Disadvantage - more classes to keep track of. Advantage - code reuse and less coding.