6) Create the following in a Java Program: Create payroll system Prompt the user to enter payroll...

80.2K

Verified Solution

Question

Programming

6) Create the following in a Java Program:


Create payroll system
Prompt the user to enter payroll information
Employee name and create variable for scanner
Hours worked
Hourly pay rate
Federal tax rate
State tax rate
Declare variable doubles for gross pay, federal, state and totaldeduction

Display payroll statement example:
Name of employee
Hours worked
Hourly pay rate
Gross pay which is equal hours worked multiply hourly payrate
Federal withholding which is equal of gross pay multiply federaltax rate
State withholdings which is equal of gross pay multiply by statetax rate
Total deduction which is equal of federal + state
Net pay which where gross pay is minus total deduction

Answer & Explanation Solved by verified expert
3.6 Ratings (333 Votes)
Below is the code in java with the output for the requiredtaskimport javautilScanner public class Main public static void mainString args int i float sum0 float average percentage    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students