Class Student
- java.lang.Object
-
- Student
-
public class Student extends Object
-
-
Field Summary
Fields Modifier and Type Field Description LibrarycollegeLibraryLibraryCardlibraryCardStringstudentNameTextBooktextBook
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddescribe()Prints out the properties of Student object, what books are borrowed, what chapters have been read and what books can be borrowed on his cardbooleanfinishedStudies()This method checks if the student has no textbook borrowed and their library card has expiredvoidstudy()If the student has borrowed a book, this method makes them read the next chapter if available, otherwise the book is returned to library.
-
-
-
Field Detail
-
studentName
public String studentName
-
collegeLibrary
public Library collegeLibrary
-
libraryCard
public LibraryCard libraryCard
-
textBook
public TextBook textBook
-
-
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
-
-