Answered step by step
Verified Expert Solution
Question
1 Approved Answer
What is wrong with this code please public class Employee { private String name; private double payRate; private int hoursWorked; public Employee ( String name,
What is wrong with this code please public class Employee private String name; private double payRate; private int hoursWorked; public EmployeeString name, double payRate this.name name; this.payRate payRate; this.hoursWorked ; public String getName return name; public double getPayRate return payRate; public int getHoursWorked return hoursWorked; public void setPayRatedouble payRate this.payRate payRate; public void setHoursWorkedint hoursWorked this.hoursWorked hoursWorked; public double getSalary return payRate hoursWorked; public static void mainString args Employee emp new EmployeeJohn Doe", ; emp.setHoursWorked; System.out.printlnEmployee Name: emp.getName; System.out.printlnPay Rate per Hour: emp.getPayRate; System.out.printlnHours Worked: emp.getHoursWorked; System.out.printlnWeekly Gross Salary: $ emp.getSalary;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started