Answered step by step
Verified Expert Solution
Question
1 Approved Answer
using java*** You are to write a class called Emploee App that contains a main method and two other static methods called changeCrewPayRates and printCrew.
using java***
You are to write a class called Emploee App that contains a main method and two other static methods called changeCrewPayRates and printCrew. changeCrewPayRates method: Parameters of the method: an array of type Employee, and a double value. Method return type: void The method should add the value passed for the double to each Employee object in the array. printCrew Method: Only parameter of the method: an array of the type Employee Method return type: void The method should print each Employee object in the array using toString method. Do the following in the main method: 1. Create an Employee object with the reference empl by passing 10.0 for the pay rate. You can choose any name for empl. 2. Print the value of count by calling the getCount method properly. (It is a static method.) 3. Create an Employee object with the reference emp2 by passing 20.0 for the pay rate. You can choose any name for emp2. 4. Print the value of count by calling the getCount method properly. 5. Print only the name and the id of emp2 using get methods. 6. Create an array of Employee type with reference crew. Use 5 for array size. 7. Print the crew array by calling the printCrew method. 8. Add empl and emp2 to the crew array cells with indices 0 and 1, respectively. 9. Assign Employee objects to other 3 cells of the array. (You choose names and pay rates for them.) 10. Print the crew array by calling the printCrew method. 11. Decrease the pay rates of each Employee in the crew by 2.0 using changeCrew PayRates method. 12. Print the crew array by calling the printCrew method. 13. Increase the pay rates of each Employee in the crew by 3.0 using changeCrewPayRates method. 14. Print the crew array by calling the printCrew method. 15. Make sure your outputs are properly labeledStep 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