Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment directions... This is the Paycheck Program code in order of pictures This is the test driver program Need to follow the assignment instructions as

image text in transcribedAssignment directions...
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribedThis is the Paycheck Program code in order of pictures
image text in transcribedThis is the test driver program
Need to follow the assignment instructions as clearly as possible
-wages: double +setWages(double newWages): void +setName(String newName) void +setHoliday(String newHoliday) :void +askHours() void +isHoliday)void askRate) void +printCheck): void +askName) void UML for our Paycheck class (Note: Underlined items indicate "static") Task 1: Based on the above UML, expand the code within "Paycheck.java" by completing the class getters" and "setters" for: "name," "hours," "holiday," and "rate." See the methods highlighted in the UML. After making these additions test the class and new methods to make sure that they work properly (NOTE: they should have no keyboard input or output to the monitor. Just let them "silently do their job). Task 2: The file "Testdriver.java" contains an array (of size 3) of paychecks. Study this program and test it to see how it runs. Currently the program reads in information for three employees and at the end prints out all three of their checks. Without modifying the class beyond what was done in "Task 1," Expand this program (Just Testdriver java) to do the following Calculate and display the total payroll for the whole company (this is the sum of every employee's gross pay Calculate and display the average hours worked for the whole company Calculate and display the average gross pay for the whole company Display the name and number of hours worked for the employee who worked the MOST hours Display the name and number of hours worked for the employee who worked the LEAST hours Display the name and gross pay for any employee who worked holiday hours. Display the name and gross pay for the biggest earner 1. 2. 3. 4. 5. 6. 7

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