Exercise 3.20 JHTP (Salary Calculator): Develop a Java application that determines the gross pay for each of three (3) employees. The company pays straight time for the first 40 hours worked by each...

1 answer below »


Exercise 3.20 JHTP (Salary Calculator):
Develop a Java application that determines the gross pay for each of three (3) employees. The company pays straight time for the first 40 hours worked by each employee and time and a half for all hours worked in excess of 40. You’re given a list of employees, their number of hours worked last week, and their hourly rates
[create your own information/data here to input into the program]. Your program should input this information/data for each employee, then determine and display the employee’s gross pay. Use class Scanner to input the employee data.






Work must include comments




CSIS 212 Programming Assignment 2 Instructions Exercise 3.20 JHTP (Salary Calculator): Develop a Java application that determines the gross pay for each of three (3) employees. The company pays straight time for the first 40 hours worked by each employee and time and a half for all hours worked in excess of 40. You’re given a list of employees, their number of hours worked last week, and their hourly rates [create your own information/data here to input into the program]. Your program should input this information/data for each employee, then determine and display the employee’s gross pay. Use class Scanner to input the employee data. Use the follow Screenshot to help code a possible solution. Note: Answers will vary based on the “fake” information/data that you chose to enter in for each employee. This assignment is due by 11:59 p.m. (ET) on Monday.
Answered Same DayJun 30, 2021

Answer To: Exercise 3.20 JHTP (Salary Calculator): Develop a Java application that determines the gross pay for...

Aditya answered on Jul 01 2021
142 Votes
import java.util.Scanner;
public class Employee
{
public static void main(String[] args)
{
Scanner scan = new S
canner(System.in);// declaring scanner object scan to take input from user

float hourlyRateEmployeeFirst; // variable to store the hourly rate of first employee
float hoursWorkedEmployeeFirst;// variable to store the hours worked of first employee
float payEmployeeFirst;// variable to store the pay of the first employee

float hourlyRateEmployeeSecond; // variable to store the hourly rate of second employee
float hoursWorkedEmployeeSecond;// variable to store the hours worked of second employee
float payEmployeeSecond;// variable to store the pay of the second employee

float hourlyRateEmployeeThird; // variable to store the hourly rate of third employee
float hoursWorkedEmployeeThird;// variable to store the hours worked of third employee
float payEmployeeThird;// variable to store the pay of the third employee

System.out.print("Enter the hourly rate: ");// prompting user to enter hourly rate for first employee
hourlyRateEmployeeFirst = scan.nextFloat();//storing the user input into hourlyRateEmployeeFirst using scan Scanner object
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here