Write the class named as SalaryEmployee_yourLastName that helps the company to calculate and print out the salary of the employes. The program should do the following tasks:
ask users to provide empolyee’ name, id, work hours and pay rate.
Print out the information of the employee with the pay check amount, for example: (if the work hours per week > 40, the extra hour get 1.5*payRate per hour)
Employee Name: CLINTON, Jenifer Employee ID: 11111 Employee Pay Rate: $15.00/hour - Work Hours: 86 Two Weeks Gross Pay: $15.0 * 80 + 1.5 * 15.0 * 6 = $1335.0 Federal Tax (18.5%) = $247.07 Social Security (4.2%) = $56.07 Medicare (1.45%) = $19.36 State (2.7%) = $36.05 Net Pay = $976.45
Hint: To do this project we need two classes: Employee and SalaryEmployee_YourLastName
Class Employee: class has the following
data members named as name (String), employID (int), department(String), payRate (double), workHour (int)
No argument constructor, parameter constructor (Learn how to write the constructor at Learn From Questions page)
the mutator methods
accessor methods. See the examples on slide 3-18 and 3-19
(Learn how to write the mutator methods and accessor methods at Learn From Questions page)
method named as calculateSalary. The formula: Salary = payRate * workHour + 1.5 * payRate *overTimeHour
Method toString (Learn how to write the method toString at Learn From Questions page)
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference
and should not be submitted as is. We are not held liable for any misuse of the solutions.
Please see the frequently asked questions page
for further questions and inquiries.
Kindly complete the form.
Please provide a valid email address and we will get back to you within 24 hours.
Payment is through PayPal, Buy me a Coffee
or Cryptocurrency.
We are a nonprofit organization however we need funds to keep this organization operating
and to be able to complete our research and development projects.