java.lang.ObjectCSCStudent
The CSCStudent class represents a student in the Computer Science program.
| Constructor Summary | |
CSCStudent()
Constructs a default CSCStudent object. | |
CSCStudent(java.lang.String name)
Constructs a CSCStudent object with the given name. | |
CSCStudent(java.lang.String name,
int age, java.lang.String gender, java.lang.String sn,
java.lang.String gpa)
Constructs a CSCStudent object with the name, age, gender, student number and gpa. | |
| Method Summary | |
boolean |
equals(java.lang.Object student2)
Checks whether the given student2 object is the same as this student. |
int |
getAge()
Gets the student's age. |
java.lang.String |
getGender()
Gets the student's gender. |
java.lang.String |
getGPA()
Gets the student's GPA. |
java.lang.String |
getName()
Gets the student's name. |
java.lang.String |
getStudentNumber()
Gets the student number. |
static int |
gettotalStudents()
Gets the total number of students in the Computer Science program. |
boolean |
isEligible()
Checks whether this student meets the minimum GPA requirement for the Computer Science program. |
double |
percentGrade()
Calculates and returns the percentage equivalent of this students GPA. |
void |
setAge(int age)
Sets the student's age to the given parameter. |
void |
setGender(java.lang.String gender)
Sets the student's gender to the given parameter. |
void |
setName(java.lang.String name)
Sets the student's name to the given parameter. |
static void |
setProgramFee(double fee)
Sets the tuition fee for the Computer Science program to the given parameter. |
static void |
setReqGPA(java.lang.String req)
Sets the minimum GPA requirement for being in the Computer Science program to the given parameter. |
void |
setSN(java.lang.String sn)
Sets the student number to the given parameter. |
java.lang.String |
toString()
Returns a string representation of CSCStudent that looks like: "Full Name : Student Number : age : gender : gpa" |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait,
wait, wait |
| Constructor Detail |
public CSCStudent()
public CSCStudent(java.lang.String name)
name - The name of the student.public CSCStudent(java.lang.String name,
int age,
java.lang.String gender,
java.lang.String sn,
java.lang.String gpa)
name - The name of the new student as a String .
age - The age of the new student as an int .
gender - The gender of the new student as a String
.
sn - The student number as a String .
gpa - The student's gpa as a String .| Method Detail |
public void setName(java.lang.String name)
name - The new name as a String
.public void setAge(int age)
age - The new age as an int .public void setGender(java.lang.String gender)
gender - The new gender as a String
.public void setSN(java.lang.String sn)
sn - The new student number as a String
.public java.lang.String getName()
String .public int getAge()
int.public java.lang.String getGender()
String .public java.lang.String getStudentNumber()
String .public java.lang.String getGPA()
String .public static int gettotalStudents()
int
.public static void setProgramFee(double fee)
fee - The program fees as a
double.public static void setReqGPA(java.lang.String req)
req - The GPA requirement for the program as a String
.public boolean equals(java.lang.Object student2)
student2 - The object with which you want to compare this
one.
public java.lang.String toString()
String representing this student.public boolean isEligible()
public double percentGrade()
double
.