Ask your own question, for FREE!
Computer Science 26 Online
OpenStudy (anonymous):

Please help new to java, an easy one, but I am confused. a non-GUI based Java application that calculates weekly pay for an employee. The application should display text that requests the user input the name of the employee, the hourly rate, and the number of hours worked for that week. The application should then print out the name of the employee and the weekly pay amount. In the printout, display the dollar symbol ($) to the left of the weekly pay amount and format the weekly pay amount to display currency. Please see attachment

OpenStudy (anonymous):

Scanner kb = new (Scanner( system.ini); This is a problem preventing the program to run

OpenStudy (konradzuse):

why did you make a new question when we were helping you in your last one?

OpenStudy (anonymous):

I apologise, I did not know how to get back

OpenStudy (anonymous):

I have solved the firstproblem I have a new problem Modifythe Payroll Program application so it continues to request employee information until the user entersstop as the employee name. In addition, program the application to check that the hourly rate and number of hours worked are positive numbers. If either the hourly rate or the number of hours worked is not a positive value, the application should prompt the user to enter a positive amount.

OpenStudy (anonymous):

This is where I am at: public static void main(String[] args) { String name; double rate; double hours; double pay; Scanner input = new Scanner(System.in); System.out.println("Welcome to the payroll program\n"); System.out.println("Enter your name:"); fname = input.nextLine(); System.out.println("Enter your hourly rate:"); rate = input.nextDouble(); System.out.println("Enter the amount of hours worked:"); hours = input.nextDouble(); pay = rate * hours; System.out.println("\nName: " + name); System.out.println("Hourly rate: $" + rate); System.out.println("Hours worked: " + hours); System.out.println("Total pay: $" + pay); }

OpenStudy (anonymous):

let me know if you still need help with it, pm me

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!