Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

More Books

Students also viewed these Databases questions

Question

Draw and explain the operation of LVDT for pressure measurement

Answered: 1 week ago

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago