Question: Write a program to calculate the payment for an employee. The program defines the following variables: payAmount: This variable will hold the amount of the

Write a program to calculate the payment for an employee. The program defines the following variables:
payAmount: This variable will hold the amount of the pay the employee earns each pay period. Your program will ask the user to enter the amount the pay the employee earn each pay period. (Assume that the employee get the same amount for all pay periods.)
payPeriods: This variable will hold the number of pay periods in a year.
annualPay: This variable will hold the employee's total annual pay, which will be calculated.
bonusRate: This variable will hold the bonus percentage for an employee.
bonusPay: This variable will hold the employee's bonus amount based on the total annual pay and the bonus rate. his item will be calculated.
totalPay: This variable will hold the total amount of pay the employee earns for the year, which is the sum of the annual pay and the bonus pay.
federalTax: This variable will hold the federal tax withholding for the employee, which is multiplication of the total pay and 25%.
stateTax: This variable will hold the state tax withholding for the employee, which is multiplication of the total pay and 10%.
netAnnualPay: This variable will hold the amount of the net annual pay the employee earns for the year, which is total pay - federalTax - stateTax
The program should ask the user to enter the amount of pay the employee earns each pay period, the pay periods, and the bonus rate. Then the program will calculate the annual pay by multiplying the employee's pay amount by the number of pay periods in a year and store the result in the annualPay variable. The program will then calculate the amount of the bonus by multiplying the annual pay with the bonus rate and store the result in the bonusPay variable. Finally the program will calculate and display the total pay, federal tax, state tax, and net annual pay.
 Write a program to calculate the payment for an employee. The

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!