Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions

Question

8. Describe the steps in the development planning process.

Answered: 1 week ago