Assignment #11

Instructions

  1. Write a Java application that does the following:
    1. Create two files for your program: LastNameFirstName11.java, which has the main() method definition, and a second file, MyProgram.java, which contains two static variables and the two static methods.
    2. In the file MyProgram.java, initialize (declare and instantiate) your first and last name as two separate static String variables.
    3. In the LastNameFirstName11.java file, output your full name using the two separate static String variables in the file MyProgram.java. Use either System.out.println() or JOptionPane.showMessageDialog().
    4. In the MyProgram.java file, define (write) a static method that returns your initials. The method should use the static String variables that store your first and last name.
    5. In the LastNameFirstName11.java file, call this method and output the results. Use either System.out.println() or JOptionPane.showMessageDialog().
    6. In the MyProgram.java file, define (write) a static method that returns your first name in all lowercase letters and last name in all upper case letters. The method should use the static String variables that store your first and last name.
    7. In the LastNameFirstName11.java file, call this method and output the results. Use either System.out.println() or JOptionPane.showMessageDialog().
    8. Don't forget to include Java documentation (javadoc) comments in your program. See the Java Coding Standard for details.
    9. See the syllabus for the Assignment Grading Guidelines for your program assignments.

Example Input and Output

William Albritton
W. A.
william ALBRITTON

Click to validate the HTML code

Click to validate the CSS code