Assignment 23
import java.util.Scanner;
public class MoreUserInput
{
public static void main( String[] args )
{
String fName, lName;
int grade, id;
double gpa;
Scanner keyboard = new Scanner(System.in);
System.out.println( "Please enter the following information:" );
System.out.println( "" );
System.out.print( "First name: " );
fName = keyboard.next();
System.out.print( "Last name: " );
lName = keyboard.next();
System.out.print( "Grade (9-12): " );
grade = keyboard.nextInt();
System.out.print( "Student ID: " );
id = keyboard.nextInt();
System.out.print( "GPA (0.0-4.0): " );
gpa = keyboard.nextDouble();
System.out.println( "" );
System.out.println( "Your information:" );
System.out.println( "\t ID: " + id + "");
System.out.println( "\t Name: " + fName + " " + lName + "");
System.out.println( "\t GPA: " + gpa + "");
System.out.println( "\t Grade: " + grade + "");
}
}