Question
//Display the name and gross pay of worker1 using getEmpName and CalculateGrossPay methods //make sure to format the gross pay using the NumberFormat class //Display
//Display the name and gross pay of worker1 using getEmpName and CalculateGrossPay methods //make sure to format the gross pay using the NumberFormat class //Display the name,bonus, and total earnings ( bonus + gross pay) of wokrer1. Use the calculateBonus method //when calculating the bonus for worker1. worker1 is an excellent HospitalEmployee // a new worker in the Firm //create a HospitalEmployee called worker2 using constructor with parameters. //name is Your name, Emp number is 555, hours worked are 40 and the pay rate is 28.5 //Display the state of worker2 using the toString method //Display the name,bonus, and total earnings (bonus + gross pay) of wokrer2. Use the calculateBonus method //when calculating the bonus for worker2. worker2 received a 20% bonus //Display the total number of HosptialEmpoyee objects System.out.println(" Goodbye!"); } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started