Assignemnt #23: More User Input of Data

Code

    /// Name: Cassie
    /// Period: 6
    /// Program Name: More User Input of Data
    /// File Name: Userdatainput.java
    /// Date Finished: 10/02/2015
                  
    import java.util.Scanner;
                  
    class Userdatainput
    {
        public static void main( String[] args)
        {
            String firstName, lastName, login;
            int grade, id;
            double gpa;
            
            Scanner keyboard = new Scanner(System.in);
            
            System.out.println( "Please enter the following information so i can sell it for a profit!" );
            System.out.print( "First name; " );
            firstName = keyboard.next();
            System.out.print( "Last Name: " );
            lastName = keyboard.next();
            System.out.print( "Grade (9-12): " );
            grade = keyboard.nextInt();
            System.out.print( "Student ID: " );
            id = keyboard.nextInt();
            System.out.print( "Login: " );
            login = keyboard.next();
            System.out.print( "GPA (0.0-4.0): " );
            gpa = keyboard.nextDouble();
            
            System.out.println( "Your Information:" );
            System.out.println( "     Login: " + login );
            System.out.println( "     ID: " + id );
            System.out.println( "     Name: " + firstName + " " + lastName );
            System.out.println( "     GPA: " + gpa );
            System.out.println( "     Grade: " + grade );
        }
    }
    

Picture of the output

Assignment 23