Question: With Java Language: In this assignment, you are to create a class named Payroll. In the class, you are to have the following data members:

With Java Language:

With Java Language: In this assignment, you are to create a class

In this assignment, you are to create a class named Payroll. In the class, you are to have the following data members: name: String (5 pts) .d: String (5 pts) hours: int (5 pts) rate: double (5 pts) private members (5 pts) You are to create no-arg and parameterized constructors and the appropriate setters(accessors) and getters (mutators). (20 pts) The class definition should also handle the following exceptions: An employee name should not be empty, otherwise an exception should be thrown. (10 pts) An employee id should have the form LLNNNN. If that form is not received, an exception should be thrown. (10 pts) thrown otherwise. (10 pts) thrown otherwise. (10 pts) An employee's hours should neither be negative nor greater than 84. An exception should be An employee's pay rate should neither be negative nor greater than 25.00. An exception should be Demonstrate this class in a program (separate class or in the same class). (5 pts) The exception messages should be appropriate to the specific exception that has occurred. (5 pts) Create a package payroll for the project.(5 pts)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!