I have to write a program for class that store 2 variables(numeric values) have them meet a condition and system.out.println("accept") or (reject), what am I doing wrong, see code below.
import javax.swing.*;
public class Admission
{
public static void main(
String[] args) throws Exception
{
double gradePointAverage;
int admissionScore;
String see = "Accept";
String see1 = "Reject";
String response = JOptionPane.showInputDialog("Enter your Grade Point Average: ");
//At this time, the variable 'str_age' contains the input from the user in a form of string.
double grade = Integer.parseInt(response);
System.out.println("Enter your Grade Point Average and press Enter. ");
gradePointAverage = (double)System.in.read();
System.in.read();
System.in.read();
System.out.println("Enter your Admission Score and press Enter. ");
admissionScore = (int)System.in.read();
System.in.read();
System.in.read();
if (gradePointAverage >= '3')
if (admissionScore > 60)
System.out.println(see);
else
System.out.println(see1);
if(gradePointAverage < '3')
if(admissionScore > 80)
System.out.println(see);
else
System.out.println(see1);
System.out.println("Your Grade Point Average Entered is " + gradePointAverage);
System.out.println("Your Admission Score Entered is " + admissionScore);
}
}