Hello,
Can anyone help me with what is wrong with my code?
Can anyone help me with what is wrong with my code?
Code:
import javax.swing.JOptionPane; public class CollegeAdmission { public static void main(String args[]) { // Declare variables String testScoreString; String classRankString; int testScore; int classRank; // Get input and convert to correct data type { input testScoreString = JOptionPane.showInputDialog("Enter testScore"); input classRankString = JOptionPane.showInputDialog("Enter ClassRank"); testScore = Integer.parseInt(testScoreString); classRank = Integer.parseInt(classRankString); } // test using admission requirements and print Accept or Reject { if( classRank >= 25) { System.out.println("Accept"); } else System.out.println("Reject"); } { if( testScore >= 80 ) { if( classRank >= 50 ) System.out.println("Accept"); else System.out.println("Reject"); } else { if( testScore >= 70 ) { if( classRank >=75 ) System.out.println("Accept"); else System.out.println("Reject"); } else { System.out.println("Reject"); } } // End of main() method } // End of CollegeAdmission class }
Comment