Question: public class Fitnesstrainer protected string name; protected int experience; protected boolean certified; //true - has trainer qualification // false - no qualification protected double basicsalary:

 public class Fitnesstrainer protected string name; protected int experience; protected boolean

certified; //true - has trainer qualification // false - no qualification protected

public class Fitnesstrainer protected string name; protected int experience; protected boolean certified; //true - has trainer qualification // false - no qualification protected double basicsalary: /ormal constructor //accessor methods //totxins, method public class Personaltrainer extends Fitnesstrainer private String workplace; //either gym or home private int hours work /umber of daily working hours /ormal constructor //accessor methods //tastring method public double calculate Incentive(); } public class GroupTrainer extends Fitness Trainer private String workscheduls; //either weekdays or weekend private String activity: //yoga, aerobics, zumba, etc 1ormal constructor //accessor methods 1/50string() method Font hos Select - Paragraph Styles Editing Voice b) Write an application program that perform the following tasks: i. Declare an array named personal to store personal trainers' information and another array named group to store group trainers' information where the number of arrays is determined by the user. ii. Read all attributes for both subclasses into array I iii. Calculate and display the incentive earned by each personal trainer whose workplace is at the gym

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!