Class DocStudent
- java.lang.Object
-
- DocStudent
-
- Direct Known Subclasses:
DocGraduateStudent
,DocUndergraduateStudent
public class DocStudent extends java.lang.Object
Generic student.
-
-
Constructor Summary
Constructors Constructor Description DocStudent()
Default constructor.DocStudent(java.lang.String name)
Initial value constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setMark(int testNumber, int mark)
Set the mark for specified test.java.lang.String
toString()
Produce printable information about the student.
-
-
-
Method Detail
-
toString
public java.lang.String toString()
Produce printable information about the student.- Overrides:
toString
in classjava.lang.Object
- Returns:
- String with student's name, marks, and grade.
-
setMark
public void setMark(int testNumber, int mark)
Set the mark for specified test.- Parameters:
testNumber
- Index for the testmark
- Mark achieved in the test
-
-