Friday, April 14, 2017

Instantiate a subclass in Java

The following code actually instantiates the project manager subclass of the employee detail superclass. It inputs the manager's id, name, etc. and then instantiates a project manager passing the variables just input to the subclass constructor which in turn invokes the superclass constructor.

This concludes the initial version of the programs and screenshots for the JVA101 Introduction to coding class. There is another lesson dealing with error handling (exceptions) which we may add in the future.

 View expanded image on
 Click to view expanded image on

No comments:

Post a Comment