Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions