/*
 * SampleProgram.java
 *
 * Version:
 *     $Id$
 *
 * Revisions:
 *     $Log$
 *
 */

//  Import statements are placed here
import java.util.Scanner;

/**
 * SampleProgram accepts a person's name, and prints a greeting
 *
 * @author      Cheryl A. Dugas
 *
 */

public class SampleProgram {

    /**  
     * The main program prompts for name and prints a greeting
     *
     * @param args command line arguments (ignored)
     *
     */
	public static void main ( String args[] ) {

	    String firstName;           // person's name

	    // need scanner (instance of class Scanner) in order to read input
	    // System.in indicates input is to come from standard input
	    Scanner scanner = new Scanner( System.in ); // used for input

	    // prompt user for first name and read it in
	    System.out.println( "What is your first name?" );
	    firstName = scanner.next();  // user types in name

	    // print greeting

	    System.out.println();
	    System.out.println( "Hello, " + firstName + "!");
	    System.out.println();

	}

}    // SampleProgram

