Question
hi I need help in my java code but when I run it, the employee name and hourly rate are asked at the same time
hi I need help in my java code but when I run it, the employee name and hourly rate are asked at the same time instead of in sequential order within the loop. I also want to calculate the TOTAL SUM of collected taxes for all three employers but don't have knowledge in creating array lists and finding the sum yet. The sum is supposed to go into the last print statement of the program. I'm trying to calculate the pays for each of the three employees, collect the tax from each employee then add it all up to get the amount the company will withhold. the image is attached to show you what i mean when the employee name and hourly rate are asked at the same time. this is what i have so far:
import java.util.Scanner; import java.util.List; public class Assignment1 { public static void main (String [] args) { Scanner input = new Scanner (System.in); int count = 0; System.out.println("Enter a tax rate between 0 and 1.0"); float tax = input.nextFloat(); input.nextLine(); while (count
Assignmenti Java Application DAXProgram Files Java yre1.8.02bin yavaw.exe rick wil1 be paid 356.0 before taxes rick will be taxed 0.2 rick will be paid 284.8 after taxes have been withhelod Enter employee name. Enter hourly 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