public class CEstudent extends Student
toString
method is prefixed by "CE".Constructor and Description |
---|
CEstudent(java.lang.String name)
Create a CE student having the given name, and
assigns it a serial 3-digit ID prefixed by
"200102" and an empty (fresh) record.
|
Modifier and Type | Method and Description |
---|---|
boolean |
setCourseGrade(java.lang.String course,
java.lang.String grade)
Update the student's record in exactly the same
manner as in the
COSCstudent class
except that no 'E' grade is allowed. |
java.lang.String |
toString()
Return a string representation of
this
student. |
equals, getCourseGrade, getFirstCourse, getGpa, getID, getName, getNextCourse, getRandom, getRandom, hashCode, iterator, setSeed
public CEstudent(java.lang.String name)
name
- the name of the CE student.public boolean setCourseGrade(java.lang.String course, java.lang.String grade)
COSCstudent
class
except that no 'E' grade is allowed.setCourseGrade
in class Student
course
- the course the student tookgrade
- the achieved grade in that coursetrue
if the record was updated
as requested and return false
otherwise.
The record will not be updated if the given course
number is not made up of exactly 4 digits or if the
given letter grade is not one of the letters (A,B,C,D,E,F)
in capital or small-case.