Question
Hello. I am really struggling with java and need help with this please. 1. Create a class Employee. Class Employee defines employee first name, last
Hello. I am really struggling with java and need help with this please.
1. Create a class Employee. Class Employee defines employee first name, last name and empid. Class Employee also defines a method String empInfo() which returns employee name and empid.
2. Create a subclass SalariedEmployee. SalariedEmployee extends Employee. It has class variables for job title and weekly salary and overrides the Employee empInfo method. The empInfo method returns the employees name, empid, title and salary. Provide suitable constructors to initialize all variables.
3. Create a subclass HourlyWorker that also extends Employee. It has class variables job title, hourly rate and hours worked and overrides the empInfo method. The empInfo method returns the employees name, empid, title and computed salay. Provide suitable constructors to initialize all variables.
4. Create a subclass SalaryPlusBonus that extends SalariedEmployee. It has class variables of weekly sales and percentageBonus and overrides the SalariedEmployee empInfo method. The empInfo method returns the employees name, empid, title and computed salary. Salary is the fixed weekly salary plus a percentage of weekly sales. Provide suitable constructors to initialize all variables.
5. Create a Form to allow a user to select an employee id and display information about the employee.
6. Create several employees of different type (SalariedEmployee, HourlyWorker ) along with data specific for this weeks salary. Add each employee to an array of Employee. (Employee [] e; ] .Add the empids to the JComboBox. The comboBox indices should be the same as the index to the reference to the Employee object in the array. (parallel arrays)
Thank you.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started