Assignment 2
I have provided a zip file with the assignment instructions and files necessary to complete the assignment. I have also included the instructions below.
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.
In this exercise, youll 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.
Create a new superclass Employee that contains these instance variables and methods and a constructor.
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 CommissionEmployees constructor should invoke class Employees constructor and CommissionEmployees toString method should invoke Employees toString method.
Once youve 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.
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.
Trackbacks & Pingbacks
… [Trackback]
[…] There you will find 58552 additional Info on that Topic: uselitetutors.com/2020/08/19/assignment-2-3/ […]
… [Trackback]
[…] There you will find 57233 additional Info to that Topic: uselitetutors.com/2020/08/19/assignment-2-3/ […]
… [Trackback]
[…] Here you can find 63793 additional Information to that Topic: uselitetutors.com/2020/08/19/assignment-2-3/ […]
… [Trackback]
[…] Find More here to that Topic: uselitetutors.com/2020/08/19/assignment-2-3/ […]
… [Trackback]
[…] Read More to that Topic: uselitetutors.com/2020/08/19/assignment-2-3/ […]
Leave a Reply
Want to join the discussion?Feel free to contribute!