Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(Payroll) Write a program that calculates an employees monthly gross pay and net pay. The program should ask the user to enter: His/her name. Store

(Payroll)

Write a program that calculates an employees monthly gross pay and net

pay. The program should ask the user to enter:

His/her name. Store this value in a variable called

employeeName

.

The number of hours worked per month. Store this value in a variable called

hoursWorked

.

The hourly pay rate. Store this value in a variable called

hourlyPayRate.

Assume the Federal Tax Withholding Rate is 25% and the State Tax Withholding

Rate is 7%. Use named constants FEDERAL_TAX and STATE_TAX to store the federal

withholding rate and state withholding rate, respectively.

Your program should then calculate and display:

the gross pay. Store this value in a variable called

grossPay

.

the federal tax deduction. Store this value in a variable called

federalTaxDeducation

.

the state tax deduction. Store this value in variable called

stateTaxDeduction

.

total deductions. This is the state and federal tax combined. Store this value

in a variable called

totatDeductions.

the employee's net pay. Store this in a variable called netPay.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions