/*
Chapter 7:
Grade Point Average
Programmer: Brad Shedd
Date:
August 24, 2006
Filename:
GPA.java
Purpose:
After the grades are entered, a content
pane should display the grades from lowest to highest.
*/
public
class
GPA
{
public
static
void
main (String[ ] args)
{
double
dblGPA = 4.0D;
char
chrSex =
'M';
int
intGrade = 9;
if(dblGPA
== 4.0)
{
System.out.println("The
student is on the Honor Roll.");
}
if(chrSex
==
'M')
{
System.out.println("The
student is a Male.");
}
else
{
System.out.println("The
student is Female.");
}
if(intGrade
== 9)
{
System.out.println("The
student is a Freshman.");
}
else
if
(intGrade == 10)
{
System.out.println("The
student is a Sophomore.");
}
else
if (intGrade == 11)
{
System.out.println("The
student is a Junior.");
}
else
if (intGrade == 12)
{
System.out.println("The
student is a Senior.");
}
else
if (intGrade > 12)
{ System.out.println("Invalid
Grade.");
}
}
}