Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE READ BEFORE ANSWERING!!!!! Write the code in JAVA!!! NOT PYTHON. Please Use JOptionPane for output!! You are hired by a start-up company to design

PLEASE READ BEFORE ANSWERING!!!!! Write the code in JAVA!!! NOT PYTHON.

Please Use JOptionPane for output!!

image text in transcribed

image text in transcribed

image text in transcribed

You are hired by a start-up company to design their Employee's Payroll Portal. Each employee has a name, id, hourly pay rate and weekly number of hours worked. Name and id must be nonempty strings. Hourly pay rate must be greater than $15, and an employee must work at least 20 hours per week. An employee needs to be created using at least employee's name and ID. Design an object-oriented solution that will create a data definition class for the employee object. The employee class must define all the constructors, mutators with proper validation, accessors, and special purpose methods. The employee class should have a method that returns the employee's gross pay, which is calculated as the number of hours worked multiplied by the hourly pay rate. With a completed data definition class, create your implementation class that will prompt the user to enter all the data for employees and instantiate employee objects. At the end, the program should print out a report containing all the employee's information. The report should also display the total gross pay over all the employees. Sample Input/Output: Enter the number of employees: 2 Employee \# 1 Enter employee name: Tony Dough Enter employee id: 01 Enter Hourly pay ($):20 Enter number of hours worked: 30 Employee \#2 Enter employee name: David Weiss Enter employee id: 02 Enter Hourly pay ($):15 Enter number of hours worked: 25 Message ** Employee Payroll Report Total Employee: 2 Employee Namel ID | Pay Rate | Hour Worked | Gross Pay Tony Dough 01$2030$600 David Weiss | 02 | $1525$375 Total Gross Pay: $975 Note: - Your solution must use object-oriented techniques (No points earned for a procedural solution). - Your solution must be designed as a modular solution using methods other than main, with each method performing one task. The main method should contain only a very minimal amount of code, calling methods instead. - Your solution must include appropriate constants, constructors, accessors, mutators, and special purpose methods (including a toString() method) with exception handling, as necessary in support of the problem. - Your solution may not use any functions or language constructs not covered during IT 106 or this semester's IT 206 without prior authorization from your instructor, even if you know other functions or language constructs. We want everyone to be on the same "playing field", regardless of previous programming exposure, and get practice with algorithmic design to solve problems (the intent of the course). Using something existing not discussed in class does not give you as much practice as solving the problem yourself. Doing this may lead to a substantial grade penalty, a grade of zero, or an Honor Code inquiry. When in doubt, ask! - You do NOT need to use arrays to solve this problem. Keep in mind once you have finished entering the information for one group, it is not necessary to keep the information. - Think about what type of validations might be appropriate for this application. Make sure these are all handled. - Think about any special purpose methods that might be needed in the data definition class. Special purpose methods are important when using values in instance variables to perform a specific process

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions