Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

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

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

What does the start( ) method defined by Thread do?

Answered: 1 week ago