Problems printing if statements
Thank you for anyone who takes a look at this for me.
I have been working on it all day. I can get it to compile, but I can not get it to print my if statements. I am attaching what I have got. Any help would be wonderful.
Code:
import javax.swing.JOptionPane;
public class CollegeAdmissions2
{
public static String accepted(double gpa, double entScore)
{
String decision;
if(gpa >= 3.0 && entScore >= 60 || entScore >= 85 && gpa >= 0)
decision = ("We are pleased to accept you at our school.");
else
decision = ("I am sorry, based on your scores," + "\n We cannot accept you at this time");
if(!(gpa > 0 && gpa <= 4.0 && entScore >= 0 && entScore <= 100))
decision = ("You have entered invalid data");
return decision;
}
public static void main(String[] args)
{
double gpa;
double entScore;
gpa = Double.parseDouble(JOptionPane.showInputDialog (null,"Please enter your grade point average:"));
entScore = Double.parseDouble(JOptionPane.showInputDialog (null,"Please enter your entrance score:"));
System.out.println("Welcome the Admissions Department");
System.out.println("Your gradepoint average is: " + gpa);
System.out.println("Your entrance score is: " + entScore);
String decision;
decision = accepted(gpa, entScore);
}
}