Assignemnt #23 More User Inpput
Code
///Name: Prooz Fereydouni
///Period: 7
///Project Name: More User Input
///File Name: AQ.java
///Date: 9/24/2015
import java.util.Scanner;
public class AQ
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
String firstName, lastName, login;
int grade, studentID;
double gpa;
System.out.println( "Please enter the following information so I can release it to public!" );
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( "" );
System.out.println( "Your Information: " );
System.out.println( "" );
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