Write a program Java that gets an employee’s number, pay rate, and the number of hours worked in
a week from a clerk. The program is then to validate the pay rate and the hours worked data
and, if valid, compute the employee’s weekly pay and print it along with the input data.
Company rules prohibit working more than 60 hours per week or having an hourly rate of more than $25.00/hour.
Any data with these values should generate an error message and not calculate employee pay
.
import java.util.Scanner;
public class SalCal {
public static void main(String[] args) {
Scanner sc = new
Scanner(System.in);
while(true) {
System.out.println("Enter emp Id(-1 to quit): ");
int
empID=sc.nextInt();
if(empID<0)
break;
System.out.println("Enter number of worked hours: ");
int
hours=sc.nextInt();
if(hours>60)
{
System.out.println("ERROR: Invalid
hours");
continue;
}
System.out.println("Enter pay rate: ");
double
payRate=sc.nextDouble();
if(payRate>25) {
System.out.println("ERROR: Invalid
Payrate");
continue;
}
double
wage=hours*payRate;
System.out.println("Emp "+empID+" Pay: $"+wage);
}
System.out.println("Bye...!!!");
}
}

Note : Please comment below if you have concerns. I am here to help you
If you like my answer please rate and help me it is very Imp for me
Write a program Java that gets an employee’s number, pay rate, and the number of hours...
3. A program is required by a company to read an employee‘s number, pay rate and the number of hours worked in a week. The program is then to validate the pay rate and the hours worked fields and, if valid, compute the employee‘s weekly pay and print it along with the input data c++ sorry
Program Description: Write the pseudocode for a program that will calculate and display an employee’s gross pay. Input the number of hours an employee worked for each of the 5 days of the week. Add them all up to get his hours worked for the week. Weekly Pay is calculated by adding an employee’s normal pay plus any overtime pay. Normal hours are paid at $10/hr. Any over time is paid at $15/hr. Any hours over 40 are considered overtime....
Design a program(Creating a RAPTOR flowchart) that will read a file of employee records containing employee number, employee name, hourly pay rate, regular hours worked and overtime hours worked. The company pays its employees weekly, according to the following rules: regular pay = regular hours worked × hourly rate of pay overtime pay = overtime hours worked × hourly rate of pay × 1.5 total pay = regular pay + overtime pay Your program is to read the input data...
Develop a WPF application that has a button to calculate an employee’s weekly pay, given the number of hours worked. An employee should have a first name, last name, age, and hourly consulting rate. You should be able to create an employee object and provide the hours worked to calculate the weekly pay. The application assumes a standard workweek of 40 hours. Any hours worked over 40 hours in a week are considered overtime and earn time and a half....
C++ Program The Ward Bus Manufacturing Company has recently hired you to help them convert their manual payroll system to a computer-based system. Write a program to produce a 1-week payroll report for only one employee to serve as a prototype (model) for the administration to review. Input for the system will be the employee’s 4-digit ID number, the employee’s name, hours worked that week, and the employee’s hourly pay rate. Output should consist of the employee’s ID number, the...
An employee’s total weekly pay equals the hourly wage multiplied by the total number of regular hours plus any overtime pay. Overtime pay equals the total overtime hours multiplied by 1.5 times the hourly wage. Write a program that takes as input the hourly wage, total regular hours, and total overtime hours and displays an employee’s total weekly pay. Please use else statements and python as your application.
Write a java program that asks the user for their hourly pay and the number worked for a week. Determine their gross pay assuming they are paid 15 per hour.
JAVA Programming . Description: For an unknown number of employees: prompt and receive payroll data; calculate gross pay, taxes owed, and net pay; and display a pay stub. Input : Prompt and receive input from the user for the following: /// Employee’s First and Last Name /// Hours Worked /// Pay Rate /// Overtime Rate Multiplier ** For the Employee’s First and Last Name: Both data items must be read in one prompting into one...
Java Programming Reading from a Text File
Write a Java program that will use an object of the Scanner class to read employee payroll data from a text file The Text file payroll.dat has the following: 100 Washington Marx Jung Darwin George 40 200 300 400 Kar Car Charles 50 22.532 15 30 The order of the data and its types stored in the file are as follows: Data EmployeelD Last name FirstName HoursWorked double HourlyRate Data Tvpe String String...
java Payroll class Exceptions Programming Challenge 5 of Chapter 6 required you to write a Payroll class that calculates an employee’s payroll. Write exception classes for the following error conditions: • An empty string is given for the employee’s name. • An invalid value is given for the employee’s ID number. If you implemented this field as a string, then an empty string would be invalid. If you implemented this field as a numeric variable, then a negative number or...