// // ----> THIS IS ONLY A HINT <----------- // ----> YOU MAY NEED MORE METHODS AND VARIABLE <----------- // class Award { public static void main(String arg[]) { // create workers - an array of objects (say 8) of class Worker // create managers - an array of objects (say 5) of class Manager // create directors - an array of objects (say 2) of class Director // create employees - an array of objects (say 15=8+5+2) of class Employee // Example // Employee [] employees=new Employee[15]; // Worker [] workers=new Worker[8]; // Create objects, example // employees[0]=new Employee(); // worker[0]=new Worker(); // You need to create all objects in efficient way // Assign reference of Worker, Manager and Director type of objects // to Employee Type of objects // Example // employees[0]=workers[0]; // .......... // employees[8]=manager[0]; // ...... // employees[13]=manager[0]; // You need to do this in an efficient way // See lecture notes on Polymorphism // use getInfo(), calPerformance() of all 15 employee objects // to get information and calculate performances of all workers, managers and directors // example // employees[0].getInfo(); and employees[0].calPerformance(); // to get information and calculate performance of workers[0], i.e., first worker // Best worker is the one with highest performance index, similarly manager, director // print employee id, job title, name and perfromance index by // finding best worker, manager and director // You can use a method for doing this // Try to use polymorphism here } //end of main } //end of class Award