Class CSCStudent

java.lang.Object
  extended byCSCStudent

public class CSCStudent
extends java.lang.Object

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

CSCStudent

public CSCStudent()
Constructs a default CSCStudent object.


CSCStudent

public CSCStudent(java.lang.String name)
Constructs a CSCStudent object with the given name.

Parameters:
name - The name of the student.

CSCStudent

public 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.

Parameters:
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

setName

public void setName(java.lang.String name)
Sets the student's name to the given parameter.

Parameters:
name - The new name as a String .

setAge

public void setAge(int age)
Sets the student's age to the given parameter.

Parameters:
age - The new age as an int .

setGender

public void setGender(java.lang.String gender)
Sets the student's gender to the given parameter.

Parameters:
gender - The new gender as a String .

setSN

public void setSN(java.lang.String sn)
Sets the student number to the given parameter.

Parameters:
sn - The new student number as a String .

getName

public java.lang.String getName()
Gets the student's name.

Returns:
The student's name as a String .

getAge

public int getAge()
Gets the student's age.

Returns:
The student's age as an int.

getGender

public java.lang.String getGender()
Gets the student's gender.

Returns:
The student's gender as a String .

getStudentNumber

public java.lang.String getStudentNumber()
Gets the student number.

Returns:
The student number as a String .

getGPA

public java.lang.String getGPA()
Gets the student's GPA.

Returns:
The student's GPA as a String .

gettotalStudents

public static int gettotalStudents()
Gets the total number of students in the Computer Science program.

Returns:
The total number of enrolled students as an int .

setProgramFee

public static void setProgramFee(double fee)
Sets the tuition fee for the Computer Science program to the given parameter.

Parameters:
fee - The program fees as a double.

setReqGPA

public static void setReqGPA(java.lang.String req)
Sets the minimum GPA requirement for being in the Computer Science program to the given parameter.

Parameters:
req - The GPA requirement for the program as a String .

equals

public boolean equals(java.lang.Object student2)
Checks whether the given student2 object is the same as this student.

Parameters:
student2 - The object with which you want to compare this one.
Returns:
true if the two students have the same name and student number else false.

toString

public java.lang.String toString()
Returns a string representation of CSCStudent that looks like: "Full Name : Student Number : age : gender : gpa"

Returns:
a String representing this student.

isEligible

public boolean isEligible()
Checks whether this student meets the minimum GPA requirement for the Computer Science program.

Returns:
true if the students GPA is equal or higher than the required GPA, false otherwise.

percentGrade

public double percentGrade()
Calculates and returns the percentage equivalent of this students GPA.

Returns:
the percentage grade of this student as a double .