Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Create parent class Employee with attributes: id, name, basic salary and address. Add one abstract method as calculateSalary in this class. Create child classes:

image text in transcribed
2. Create parent class Employee with attributes: id, name, basic salary and address. Add one abstract method as calculateSalary in this class. Create child classes: Manager and Consultant from Employee class. For Manager, gross salary will include 10% of basic as HRA and 15% of basic as DA apart from basic salary. For consultant, there will be one more attribute in the class as consultant fees. Gross salary will include this fees and 50% of basic as DA apart from basic salary. >Create class Organization with ArrayList of type Employee. >Add a method to add new Employee. >From test method, create object of class Organization and add few Consultants and Managers. >Display gorss salary for all employees. >Add method in Organization class which will compute average gross salary for all employees. Test this method from test method

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

Mathematical Applications for the Management Life and Social Sciences

Authors: Ronald J. Harshbarger, James J. Reynolds

11th edition

9781337032247, 9781305465183, 1305108043, 1337032247, 1305465180, 978-1305108042

More Books

Students also viewed these Mathematics questions

Question

How markets are classified under imperfect competition.

Answered: 1 week ago