a Java application using NetBeans Integrated Development Environment (IDE) for the following programming assignments listed. a Java application that assigns hourly wages to employees. Create an EmployeeException class whose constructor receives a String that consists of an employee ID and pay rate. Create an Employee class with two fields, an identification number and an hourly wage. The employee constructor requires values for both fields. Upon construction, throw an EmployeeException if the hourly wage is less than $6.00 or over $50.00. Write an application that creates at least three employees with hourly wages below, above and within the given range. Make sure that at least 2 exceptions are thrown and displayed. Call this main class ThrowEmployee. Turn in your source files named– Employee.java EmployeeException.java ThrowEmployee.java a prolog (a block of comments at the top of the class file) stating what each class does and document your code. all package statements. Purchase the answer to view it Purchase the answer to view it

Prolog:

In this programming assignment, we are required to create a Java application using the NetBeans IDE that assigns hourly wages to employees. We need to create an EmployeeException class that will be used to throw an exception if the hourly wage is less than $6.00 or over $50.00. Additionally, we need to create an Employee class with two fields, an identification number and an hourly wage. The employee constructor should throw an EmployeeException if the hourly wage is not within the given range.

Main class:

We will name our main class as ThrowEmployee. This class will be responsible for creating and managing the employees. It will create at least three instances of the Employee class, with hourly wages below, above, and within the given range. We will also ensure that at least two exceptions are thrown and displayed.

Employee class:

The Employee class will have two fields: an identification number and an hourly wage. It will have a constructor that requires values for both fields. Upon construction, if the hourly wage is less than $6.00 or over $50.00, it will throw an EmployeeException.

EmployeeException class:

The EmployeeException class will be used to throw an exception if the hourly wage is not within the given range. It will have a constructor that receives a String parameter representing the employee ID and pay rate. In the constructor, we will ensure that the hourly wage is either less than $6.00 or over $50.00. If it is not within this range, we will throw an exception.

We will now proceed to implement the required classes:

Employee.java:

“`java
public class Employee {
private String identificationNumber;
private double hourlyWage;

public Employee(String identificationNumber, double hourlyWage) throws EmployeeException {
if (hourlyWage < 6.00 || hourlyWage > 50.00) {
throw new EmployeeException(“Invalid hourly wage”);
}

this.identificationNumber = identificationNumber;
this.hourlyWage = hourlyWage;
}

// Other methods and getters/setters
}
“`

EmployeeException.java:

“`java
public class EmployeeException extends Exception {
public EmployeeException(String message) {
super(message);
}

// Other methods
}
“`

ThrowEmployee.java:

“`java
public class ThrowEmployee {
public static void main(String[] args) {
try {
Employee employee1 = new Employee(“001”, 10.50);
Employee employee2 = new Employee(“002”, 4.50);
Employee employee3 = new Employee(“003”, 60.00);
} catch (EmployeeException e) {
System.out.println(e.getMessage());
}
}
}
“`

Please note that this is just the initial implementation of the classes. You can further enhance the code by adding more functionalities, error handling, and proper documentation as required.

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Click Here to Make an Order Click Here to Hire a Writer