Package com.library.books
Class Book
java.lang.Object
com.library.books.Book
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the book to the libraryget_all_books
(String filePath) Lists all the books in the libraryReturns the value of book authorReturns the value of issued statusgetName()
Returns the value of book nameReturns the value of book volumevoid
issue_book
(String filePath, String name) Issues the book and updates its status to "Yes"void
return_book
(String filePath, String name) Returns the book and updates its status to "No"void
Sets the value of the book authorvoid
Sets the value of issued statusvoid
Sets the value of the book namevoid
Sets the value of book volumetoString()
Displays the values in book object
-
Constructor Details
-
Book
-
-
Method Details
-
getName
-
setName
Sets the value of the book name- Parameters:
name
- name of the book
-
getAuthor
-
setAuthor
Sets the value of the book author- Parameters:
author
- author of the book
-
getVolume
Returns the value of book volume- Returns:
- volume volume number of the book
-
setVolume
Sets the value of book volume- Parameters:
volume
- volume number of the book
-
getIssued
Returns the value of issued status- Returns:
- issued the issued status of the book
-
setIssued
Sets the value of issued status- Parameters:
issued
- the issued status of the book
-
toString
-
add_book
Adds the book to the library- Parameters:
filePath
- path to the library file
-
get_all_books
-
issue_book
-
return_book
-