Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This was all the information that was given to me for this assignment. I am having trouble with Java and could use the help. If

This was all the information that was given to me for this assignment. I am having trouble with Java and could use the help. If you could use Java code and something similar to NetBeans that would be great thank you!

Create a class Employee. Employees have a name. Also give Employee a method paycheck() which returns a double. For basic employees, paycheck is always 0 (they just get health insurance). Give the class a parameterized constructor that takes the name;

Add a method reportDeposit. This method prints a report for the employee with the original amount of the paycheck, the amount taken out for taxes (we will do a flat 17%), and the final amount (for basic employees this will just be a lot of 0's but make sure to do the math based on what paycheck returns).

Salaried employees are employed either for 10 or 12 months of the year for some salary. Their paycheck is their salary, divided up into two pays a month for however many months they are employed.

Using inheritance, create a class for this type of employee (more will be added in part B). Don't override reportDeposit. Give a parameterized constructor for name and salary that chains back to the parameterized superclass constructor.

In a main, create an array of employees, and set it up with some of each kind, some with different values. (hint: you've got parameterized constructors...) Loop through the list and call reportDeposit for each employee, also find the employee with the highest paycheck.

Part B

Hourly employees have an hourly wage, and a number of hours they are scheduled to work per week,. One paycheck is based on two weeks of work (they are guaranteed to have the same hours for both weeks). They are paid an extra 5% of their hourly rate for each hour over 40 hours per week they are scheduled.

Adjunct employees may teach up to 18 credits, and are paid $827 per credit, with the total spread across 2 paychecks a month for 4 months.

Add classes for these types of employee.

Add two hourly and two adjunct employees to your array in main. You shouldn't have to change anything else in main.

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

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

Under what conditions is an estimator a nonparametric estimator?

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago