Question 2: Implement a superclass Adult. Make two classes, Worker and Manager, that inherit from Adult. Each adult has a name and a year of birth. Each worker has a job title of “engineer” and each manager has a job title of “supervisor”. Write the class declarations, the constructors, and the methods toString for all classes. Supply a driver class that creates an array of Worker objects and sort them by the birth years. Moreover, create an array of Manager objects but sort them by the name Show transcribed image text Question 2: Implement a superclass Adult. Make two classes, Worker and Manager, that inherit from Adult. Each adult has a name and a year of birth. Each worker has a job title of “engineer” and each manager has a job title of “supervisor”. Write the class declarations, the constructors, and the methods toString for all classes. Supply a driver class that creates an array of Worker objects and sort them by the birth years. Moreover, create an array of Manager objects but sort them by the name
Expert Answer
Answer to Question 2: Implement a superclass Adult. Make two classes, Worker and Manager, that inherit from Adult. Each adult has …