subject

What is the problem in this program; class Main {
public static void main(String[] args) {
String userChoice;

String userName;

double hrsWorked = 0;
double payRate = 0.00;
double taxRate1 = 0.25;
double taxRate2 = 0.50;

double grossPay = 0.00;
double taxAmt = 0.00;
double netPay = 0.00;

scanner in = new scanner( System. in );

System. out. println("Please enter your first name ==> \n");
userName = in. next();

System. out. println("Do you want to compute your net pay? \n");
System. out. println("Enter Y for yes or N for no ==> ");
userChoice = in. next();

if (userChoice. equals("Y")) {
System. out. println("\n Please enter the number of hours you worked ==>");
hrsWorked = in. nextInt();

System. out. println("\n Please enter your pay rate ==> $");
payRate = in. nextFloat();

grossPay = payRate * hrsWorked;

taxAmt = (grossPay >= 500) ? grossPay * taxRate2 : grossPay * taxRate1;

netPay = grossPay - taxAmt;

System. out. println( "\n " + userName + " you said you worked " + hrsWorked + " hours at $" + payRate + "\n");
System. out. println("which means you earned a gross amount of $" + grossPay + " \n");
System. out. println("and you paid $" + taxAmt + " in taxes\n");
System. out. println("so your net pay is $" + netPay + " \n");}
else {System. out. println("\n Thank you " + userName + " then I will not computer your net pay \n");
System. out. println(" Thank you and please come again. \n");
}
}
}
also, this done repl. it PLEASE HELP ASP

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Which of the following is a way the operating system prevents unknown or unauthorized users from accessing the system?
Answers: 2
question
Computers and Technology, 23.06.2019 03:10
Acomputer has a two-level cache. suppose that 60% of the memory references hit on the first level cache, 35% hit on the second level, and 5% miss. the access times are 5 nsec, 15 nsec, and 60 nsec, respectively, where the times for the level 2 cache and memory start counting at the moment it is known that they are needed (e.g., a level 2 cache access does not even start until the level 1 cache miss occurs). what is the average access time?
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
This graph compares the cost of room and board at educational institutions in texas.
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What are ways to switch windows in excel? check all that apply. on the status bar, click the windows button, and then click the file name. on the task bar, click to display the excel jump list, and then click the file name. on the view tab, in the window group, click switch windows, and then click the file name. on the review tab, in the viewing group, click files, and then click the file name.
Answers: 1
You know the right answer?
What is the problem in this program; class Main {
public static void main(String[] args) {
Questions
question
History, 11.09.2021 09:20
question
English, 11.09.2021 09:20
question
Mathematics, 11.09.2021 09:20
question
History, 11.09.2021 09:20
question
Biology, 11.09.2021 09:30
question
English, 11.09.2021 09:30