Question: write a Java code for data class and driver class based on the instructions below. A Kitchen Product Company asks for an application that can
write a Java code for data class and driver class based on the instructions below.
A Kitchen Product Company asks for an application that can help the company to calculate the monthly salary of their sale employee salary.
DATA TYPE CLASS
Class 2023_SaleEmployeeInfo_yourLastName
Provide the UML and the code of the data type class 2023_SaleEmployee_yourLastName holds the following information of a Sale Employee about: name (string), employee id (string) of the Sale Employee, and the sale amount (float) that is the total of sale money the Sale Employee made in the month
Also, the class 2023_SaleEmployee_yourLastName has no-argument constructor, parameter constructor, method to calculate the commission, method to calculate the bonus, method to calculate total salary of the sale employee and the method toString() for the output of the salary slip
The month salary of the sale employee is calculated by using the following formula where the base salary is $2300:
The salary of the month = base salary + commission amount + bonus amount
Commission amount and Bonus amount should be calculated based on the rate in the following table:
| Sale amount | Commission Rate | Bonus Rate |
| If sale amount is 0 and less than $ 5000.00 | 0 | 0 |
| If sale amount is greater than or equal $5000 and less than $10000.00 | 2.79% On the sale | 0 |
| If sale amount is greater than or equal $10,000 and less than $15000.00 | 2.79% On the sale | 1.99% On any sale beyond $10,000 |
| If sale amount is greater than or equal to $15000 | 3.29% On the sale | 1.99% On any sale beyond $10,000 |
The application will print the salary of Sale Employee in the following format:
*If the sale amount = $15870.00
File: 2023_SaleEmployeeSalary_James.cpp
2023 SALE COMPANY Robert James
Today: 03/07/2023
----------------------------------------------------
Employee Id: 1234567
Employee Name: Amelia Grace
Sale Amount: 15870.00
----------------------------------------------------
Base Salary: 2300.00
Commission Amount: 522.12
Bonus Amount: 116.81
Salary: 2938.94
----------------------------------------------------
If the sale amount = $12550.00
File: 2023_ _James.cpp
2023 SALE COMPANY ROBERT JAMES
Today: 02/19/2023
----------------------------------------------------
Employee Id: 1234567
Employee Name: Amelia Grace
Sale Amount: 12550.00
----------------------------------------------------
Base Salary: 2300.00
Commission Amount: 350.14
Bonus Amount: 50.74
Salary: 2700.89
----------------------------------------------------
If the sale amount = $8750.00
File: 2023_SaleEmployeeSalary_James.cpp
2023 SALE COMPANY ROBERT JAMES
Today: 02/19/2023
----------------------------------------------------
Employee Id: 1234567
Employee Name: Amelia Grace
Sale Amount: 8750.00
----------------------------------------------------
Base Salary: 2300.00
Commission Amount: 244.13
Bonus Amount: 0.00
Salary: 2544.13
----------------------------------------------------
If the sale amount = $3570.00
File: 2023_SaleEmployeeSalary_James.cpp
2023 SALE COMPANY ROBERT JAMES
Today: 02/19/2023
----------------------------------------------------
Employee Id: 1234567
Employee Name: Amelia Grace
Sale Amount: 3570.00
----------------------------------------------------
Base Salary: 2300.00
Commission Amount: 0.00
Bonus Amount: 0.00
Salary: 2300.00
----------------------------------------------------
DRIVER CLASS
Provide the java application that helps the company to calculate the salary of their Sale Employee at the end of the month.
The application allows to read the information of the sale employee about name, employee id, and sale amount making in month.
Then, create the object of the data type class 2023_SaleEmployee_yourLastName and use the object to access the methods to display on the screen the monthly salary split in the required format
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
