Question: Using Object Oriented Programming to provide the application 2023_BiWeekSalaryOfEmployee_yourLastName that helps employees to print out their two weeks salary. You must provide two classes: data

Using Object Oriented Programming to provide the application 2023_BiWeekSalaryOfEmployee_yourLastName that helps employees to print out their two weeks salary.

You must provide two classes:

data type class: 2023_Employee_yourLastName

driver class: 2023_BiWeekSalaryOfEmployee_yourLastName.

DATATYPE CLASS

Class 2023_Employee_yourLastName

Provide the UML of this class before writing the code

This class holds the following:

-the information of the employee about employee id (String), employee name(String) hourly salary (float)and number of work hours (int).

-provide the methods to calculate the federal income tax amount, social security tax amount, the Medicare tax amount, net pay amount and the method toString()

The tax rates should be declared as constants:

Federal Income tax rate = 8.74%

Social Security tax rate = 6.20%

Medicare tax rate = 1.45%

Formulas:

Gross pay = salary rate * number of work hours

Federal Income tax = Gross pay * Federal Income tax rate

Social security tax = Gross pay * Social Security tax rate

Medicare tax = Gross pay * Medicare tax rate

Net pay = Gross pay (Federal Income tax+ Social Security tax+ Medicare tax)

Method toString() creates the output string that needs in the following format:

in the following format that requires the information in correct alignment and the numbers in two decimal digits.

File: 2023_BiWeeklySalaryOfEmployee_yourLastName.java

BIWEEKLY PAYMENT OF EMPLOYEE John Johnson

....................................................

Employee ID: 1234567

Sale Employee Name: Lucas Adam

Hour Salary: 18.75

Number of work hours in 2 weeks: 80

....................................................

Gross Pay: 1500.00

Federal Income Tax (8.74%): 131.10

Social Security Tax (6.20%): 93.00

Medicare Tax (1.45%): 21.75

....................................................

Net Pay: 1254.15

DRIVER CLASS

Provide the driver class 2023_BiWeeklySalaryOfEmployee_yourLastName

This application will help employees to calculate the Net pay in two weeks.

After the users provide from the keyboard the employee Id, employee name, hourly salary and number of work hours in one week; then create the object of class Employee and use this object to access the method toString() of datatype class to display the output of on the screen

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!