Question: Human +hName: String tage: int Human (String, int) abstract printFullName (): void Student Employee MARKS Statistics +marks: MARKS tavg.double +salary: double -tot Sal:double +first: double

 Human +hName: String tage: int Human (String, int) abstract printFullName ():

Human +hName: String tage: int Human (String, int) abstract printFullName (): void Student Employee MARKS Statistics +marks: MARKS tavg.double +salary: double -tot Sal:double +first: double +mid: double +Final: double bs: double-180 computeSO:double computeA 0: void computes 0: double A) Implement the previous class Diagram: . Override the printFullName 0 method in sub classes to print name, avg for student class and name, salary for employee class computeA 0: calculate the average for marks and store the value in avg. computeS 0: calculate salary according to the following formula: salary-bs-bs*0.1 Note: totSal:private static variable to calculate total salary for all employees. B) Write Testl class that do the following: Declare an array of 5 Human references. void fillinfo(Human h : method to fill array information by asking the user of his type Student or Employee. int numOfEmp (Human h []) returns the number of employee in the company

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!