Loading

[NEW SOLN] CSIS 312 ASSIGNMENT 2 EMPLOYEE CLASS

[SOLVED] CSIS 312 ASSIGNMENT 2 EMPLOYEE CLASS: In chapter 9 of your Deitel & Deitel text, you studied an inheritance hierarchy in which class BasePlusCommissionEmployee inherited from class CommissionEmployee. However, not all types of employees are CommissionEmployees.

[SOLVED] CSIS 312 ASSIGNMENT 2 EMPLOYEE CLASS: In this exercise, you’ll create a more general Employee superclass that factors out the attributes and behaviors in class CommissionEmployee that are common to all Employees. The common attributes and behaviors for all Employees are firstName, lastName, socialSecurityNumber, getFirstName, getLastName, getSocialSecurityNumber and a portion of method toString.

[SOLVED] CSIS 312 ASSIGNMENT 2 EMPLOYEE CLASS: Create a new superclass Employee that contains these instance variables and methods and a constructor.

[SOLVED] CSIS 312 ASSIGNMENT 2 EMPLOYEE CLASS: Next, rewrite class CommissionEmployee from Section 9.4.5 as a subclass of Employee. Class CommissionEmployee should contain only the instance variables and methods that are not declared in superclass Employee. Class CommissionEmployee’s constructor should invoke class Employee’s constructor and CommissionEmployee’s toString method should invoke Employee’s toString method.

[SOLVED] CSIS 312 ASSIGNMENT 2 EMPLOYEE CLASS: Once you’ve completed these modifications, run the BasePlusCommissionEmployeeTest app using these new classes to ensure that the app still displays the same results for a BasePlusCommissionEmployee object.

[SOLVED] CSIS 312 ASSIGNMENT 2 EMPLOYEE CLASS: Make sure that your screen shots show your program running and that your runtime display shows that your program does all that is required of it. You only get credit for what you demonstrate.

Submit this assignment by 11:59 p.m. (ET) on Monday of Module/Week 2.

Support