Class Student


  • public class Student
    extends Object
    • Constructor Detail

      • Student

        public Student​(String name,
                       Library library)
        Public constructor for Student class
        Parameters:
        name - Name of the student
        library - The college library available for the student
    • Method Detail

      • finishedStudies

        public boolean finishedStudies()
        This method checks if the student has no textbook borrowed and their library card has expired
        Returns:
        true if no textbook and librarycard has expired, Otherwise false
      • study

        public void study()
        If the student has borrowed a book, this method makes them read the next chapter if available, otherwise the book is returned to library. If the student has no book, the student borrows one from the library
      • describe

        public void describe()
        Prints out the properties of Student object, what books are borrowed, what chapters have been read and what books can be borrowed on his card