Java Programming

 

         

 

Mountville

 

import java.util.Scanner;

/*
* Write a Java program that will decide if a student gets into Mountville University. Students must have one of the
following criteria:
• been a valedictorian or salutatorian of a school of 1400 or more
• had a gpa of 4.0 or better and a SAT score of 1100 or more
• had a gpa of 3.5 or better and an SAT score of 1300 or more
• had a gpa of 3.0 or better and an SAT score of 1500 or more
*/
public class Mountville {

public static void main(String[] args) {
// Variables
boolean valedictorian = false;
double gpa = 0.0;
int sat = 0;
Scanner input = new Scanner(System.in);

System.out.println("Where you the valedictorian or salutatorian of a school of 1400 or more?");
System.out.println("Please enter either true or false");
valedictorian = input.nextBoolean();

if (valedictorian == true)
{
System.out.println("Congratulations, you have been accepted to Mountville University!");
} // end of if statement
else
{
System.out.println("Please enter your GPA.");
gpa =
System.out.println("Please enter your SAT score.");
sat =
if (gpa && sat)
{
System.out.println("Congratulations, you have been accepted to Mountville University!");
}
else if( gpa && sat)
{
System.out.println("Congratulations, you have been accepted to Mountville University!");
}
else

}

}

}