Limited Offer Get 25% off — use code BESTW25
No AI No Plagiarism On-Time Delivery Free Revisions
Claim Now

For this activity you will implement encapsulation and inheritance in a simple but concrete example. A software business needs your help to design an employee class that includes the following attributes: employee ID (empID), employee name (nam

For this activity you will implement encapsulation and inheritance in a simple but concrete example. A software business needs your help to design an employee class that includes the following attributes: 
employee ID (empID),
employee name (name), 
employee pay rate (payRate),
employee hours (hours),
employee extended pay (extendedPay),
employee counter (empCounter).
The business currently hires information technology employees in the form of computer programmers as well as accounting employees. You will design a superclass Employee and the two subclasses InfoTech and Accounting. The Employee class will contain several types of attributes. See the UML diagram for the specifications.
Program Specifications:
Employee Class:
The following attributes are entered directly by the user: name, payRate, hours.
The extendedPay attribute is calculated as: (payRate * hours).
The static attribute empCounter will be incremented each time an Employee object is added. During each add process, capture the value of empCounter and store it in the non-static attribute of empID.
InfoTech and Accounting Classes:
The InfoTech class will contain the private string variable progLanguage specifying in which programming language the employee is most skilled, and the Accounting class will contain the private Boolean variable glAccess that specifies whether the employee should have access to the general ledger. Both of those attributes will be input by the user.
Other:
Create separate classes for: Employee, InfoTech, and Accounting.
Include a main() method to use the classes for this assignment.
Each class will contain appropriate constructors, set, and get methods.
The superclass Employee will contain a toString method that outputs a message indicating a general employee has been established (hard-coded as text) and will indicate the employee ID, name, pay rate, hours, and extended pay.
Each subclass will contain a toString method that outputs the employee type (hard-coded as text) and the value of each attribute from the superclass and from the class.
Program Execution:
First, using a main() method, create an Employee object to create a general employee and call its toString() method.
Next, create at least two InfoTech and two Accounting objects varying the attributes of each and call the toString() methods for each object calling its class’s toString() method.
Finally, create a new reference to an Employee object and individually point it to each of your existing objects one-by-one calling the toString() method polymorphically using the Employee reference.
NOTE: The attribute values for each object instance can be passed as hard-coded values.
Also:
Include appropriate package import declarations as needed.
Observe proper commenting/documentation techniques. Include clearly written comments/documentation to explain the purpose of major blocks of code. As needed/appropriate, include additional levels of comments/documentation detail to help you understand your code and logic as well as to help your reader understand the same.
Observe proper naming conventions for classes, attributes, methods, etc.
To submit your work:
Include your .java files.
Include screen captures of the output generated when calling the toString() method and other methods for output for several Employee object instances varying the attributes for each.
Demonstrate that the output is on your system and ensure that the output is readable. You may wish to resize the output pane to see more output on screen when taking screen captures of your output.
Submit your files as a single zipped “.zip” file

Plagiarism Free Assignment Help

Expert Help With This Assignment — On Your Terms

Native UK, USA & Australia writers Deadline from 3 hours 100% Plagiarism-Free — Turnitin included Unlimited free revisions Free to submit — compare quotes
Scroll to Top