Question
using Java (include if statements) Paying Employees A company has three different types of employees: Salaried employees : These employees are paid a yearly salary
using Java (include if statements)
Paying Employees
A company has three different types of employees:
Salaried employees: These employees are paid a yearly salary separated into 52 weekly payments.
Hourly employees: These employees are paid a particular dollar amount per hour of work. These employees are also paid 1.5 times their hour wage for all hours worked above 40 hours.
Production employees: These employees are paid based on the amount of product produced. For example, if the employee is paid $1.25 for each item produced and they produce 100 items, then their pay is $125.00.
Write a program, called wages, that will prompt the user for the employee type, and then based on the employee type, will prompt them for the appropriate information in order to calculate that employees weekly pay.
Your program should:
Ask the user for an employee type. Ask them to enter 1" for salaried, 2 for hourly, or 3 for production.
If the user enters a valid employee type, then your program should ask the appropriate questions for that employee to determine the weekly salary:
if the employee is salaried, ask for the yearly salary. Then report the weekly salary.
if the employee is hourly, ask for the pay rate. Then ask for the number of hours worked. Then report the weekly salary. Dont forget about possible overtime pay!
if the employee is production, ask for the piece good rate. Then ask for the number of pieces made. Then report the weekly salary.
Otherwise, it should state that the user entered an invalid employee type (and do nothing else).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started