Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question: TeamLeader Class In a particular factory, a team leader is an hourly p

ID: 3617133 • Letter: Q

Question

Question: TeamLeader Class

In a particular factory, a team leader is an hourly paidproduction worker who leads a small team. In addition to hourlypay, team leaders earn a fixed monthly bonus. Team leaders arerequired to attend a minimum number of hours of training per year.Design a TeamLeader class that inherits from the ProductionWorkerclasses you designed in programming challenge 1 (the question forchallenge 1 is also posted here with answer(/answers-feb-10/computer-science/java-please-help-will-rate-question-employee-and-productionworker-classes-design-a_783214.aspx). The TeamLeader class should have fields for the monthly bonusamount, the required number of training hours, and the number oftraining hours that the team leader has attended. Write one or moreconstructors and the appropriate accessor and mutator methods forthe class. Demonstrate the class by writing a program that uses aTeamLeader object.

Explanation / Answer

publicclass TeamLeader extends ProductionWorker { // instancevariables privatedouble monthlyBonus; privateint trainingHoursRequired; privateint trainingHoursAttended; //constructors publicTeamLeader(String name, String number, StringhireDate, int shift, double hourlyRate, double monthlyBonus, double trainingHoursRequired) { super(name, number, hireDate, shift,hourlyRate); setMonthlyBonus(monthlyBonus); setTrainingHoursRequired(trainingHoursRequired); } // accessors publicdouble getMonthlyBonus() { return monthlyBonus; } publicint getTrainingHoursRequired() { return trainingHoursRequired; } publicint getTrainingHoursAttended() { return trainingHoursAttended; } // modifiers publicvoid setMonthlyBonus(double m) { monthlyBonus = m; } publicvoidsetTrainingHoursRequired(int t) { trainingHoursRequired= t; } publicvoidsetTrainingHoursAttended(int t) { trainingHoursAttended= t; } } Demonstrating/testing the class should beeasy.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote