Assignment 23: More User Output of Data

Code

    /// Name: Ryan McAteer
    /// Period: 5
    /// Program Name: More User Input of Data
    /// File Name: Assignment23.java
    /// Date Finished: 9/22/15

import java.util.Scanner;

class Assignment23 
{
      public static void main(String[] args) 
      {
            
            String firstName, lastName, login;
            int grade, studentId;
            double gpa;
            
            Scanner keyboard = new Scanner(System.in);
            
            System.out.print( "Hello and Welcome to the official, unoffical school database!" );
            System.out.println( " " );
            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:" );
            studentId = 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: " + studentId );
            System.out.println( "     Name: " + lastName + ", " + firstName );
            System.out.println( "     GPA: " + gpa );
            System.out.println( "     Grade: " + grade );
      }
}
    

Picture of the output

Assignment 23