Code Java classes named Lab1 and Greeting with the following features:
- The Lab1 class contains
- a main method which
- prints a hello message
- calls an internal subroutine to print a second message
- creates an instance of the Greeting class
- calls the hello() method of this class instance to print a generic hello message
- calls the hello(who) method of this class instance once for each command line parameter to print a series of personalized
hello messages
- a static subroutine/method called from main which prints a hello message
- The Greeting class contains
- a non-static method with the signature hello() which prints a hello message using the JOptionPane.showMessageDialog() method
- a non-static method with the signature hello(String who) which prints a personalized hello message
Use this file as a starting point.
|