Class DocStudent

    • 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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DocStudent

        public DocStudent()
        Default constructor.
      • DocStudent

        public DocStudent​(java.lang.String name)
        Initial value constructor.
        Parameters:
        name - Name of the student.
    • Method Detail

      • toString

        public java.lang.String toString()
        Produce printable information about the student.
        Overrides:
        toString in class java.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 test
        mark - Mark achieved in the test