CSci 161 Lab #1
 

Code Java classes named Lab1 and Greeting with the following features:

  • The Lab1 class contains
    • a main method which
      1. prints a hello message
      2. calls an internal subroutine to print a second message
      3. creates an instance of the Greeting class
      4. calls the hello() method of this class instance to print a generic hello message
      5. 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.

 
When you are finished, ask your lab instructor to check your work and record your scores.