Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In java. 1. Using a loop of your choice, read information from the console about employees in a company. Each employee has an ID (integer)
In java.
1. Using a loop of your choice, read information from the console about employees in a company. Each employee has an ID (integer) and number of hours worked that week (double) and hourly pay rate double) a. After you read in an employee' s information, you will calculate the salary for that week by multiplying the number of hours worked by the hourly rate. Number of hours and hourly rate should be real numbers with one or two decimal places b. Print a statement clearly indicating the employee ID, number of hours worked, hourly rate and the total salary for that week c. Use a counter varlable to keep track of how many employees were processed d. Continue reading information for all employees, processing and printing the information as above until the ID less than or equal to 0. When the ID is or less, you should not be entering hours worked or hourly rate. This reans you should read ID separately and continue reading the rest of the data per employee only 1f ID is 1 e. When the loop is done, print the total number of employees processed by the program and the total salary of all employees f. Print the program and the output 2. Now add to your program print statements so that the hours worked and salary wi11 print with two decimal places. Create fixed columns for each piece of data (ID, hors worked, hourly rate and total salary)Numbers should be right adjusted so the dollars and cents line up. Run the program again with the sare data and see what the output looks like now. Print the program and the output 3. Add an if-else statement in your program to compute tax on the salary. If the salary is less than $300, the tax rate is .03, if salary is between $300 and $350 the tax rate is .04 otherwise the tax rate is .05. Compute the tax by multiplying the salary by the tax rate. Add the tax as another column of your output table. Print the program and the output Use these values as input to cover all three tax groups 12.5 15.8 18.9 20.25 rate 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