Assignemnt #23: More User Data
Code
/// Name: Sean Harrison
/// Period: 7
/// Program name: More User Data
/// File Name: MoreUserData.java
/// Date Finished: 9/28/2015
import java.util.Scanner;
public class MoreUserData
{
public static void main( String[] args )
{
int grade, ID_Number;
double GPA;
String firstName, lastName, login;
Scanner keyboard = new Scanner(System.in);
System.out.println( "Please enter the following informatition so I can sell it for a profit! " );
System.out.println( "First name: " );
firstName = keyboard.next();
System.out.println();
System.out.println( "Last name: " );
lastName = keyboard.next();
System.out.println();
System.out.println( "Grade: " );
grade = keyboard.nextInt();
System.out.println();
System.out.println( "Student ID: " );
ID_Number = keyboard.nextInt();
System.out.println();
System.out.println( "Login: " );
login = keyboard.next();
System.out.println();
System.out.println( "GPA (0.0-4.0): " );
GPA = keyboard.nextDouble();
System.out.println();
System.out.println( "Your information: " );
System.out.println( "Login : " + login );
System.out.println( "ID: " + ID_Number );
System.out.println( "Name: " + lastName + " " + firstName );
System.out.println( "GPA: " + GPA );
System.out.println( " Grade: " + grade );
}
}
Picture of the output