|
Library Management
|
Represents a book in the library management system. More...
#include <Book.h>

Public Member Functions | |
| Book () | |
| Default constructor for the Book class. Initializes a book with default values. | |
| Book (string title, string author, string genre, short publicationYear, long long isbn, bool isAvailable) | |
| Parameterized constructor for the Book class. Initializes a book with the provided details. | |
| const string & | getTitle () const |
| Get the title of the book. | |
| void | setTitle (const string &title) |
| Set the title of the book. | |
| const string & | getAuthor () const |
| Get the author of the book. | |
| void | setAuthor (const string &author) |
| Set the author of the book. | |
| const string & | getGenre () const |
| Get the genre of the book. | |
| void | setGenre (const string &genre) |
| Set the genre of the book. | |
| short | getPublicationYear () const |
| Get the publication year of the book. | |
| void | setPublicationYear (short publicationYear) |
| Set the publication year of the book. | |
| long long | getIsbn () const |
| Get the ISBN of the book. | |
| void | setIsbn (long long isbn) |
| Set the ISBN of the book. | |
| bool | isAvailable () const |
| Check if the book is available. | |
| void | setIsAvailable (bool isAvailable) |
| Set the availability of the book. | |
| bool | operator< (const Book &b) const |
| Compare two books based on their ISBN. | |
| bool | operator== (const Book &b) const |
| Compare two books for equality based on their ISBN. | |
| string | getInfo () const |
| Get detailed information about the book. | |
| int | getFine () const |
| Get the fine associated with the book. | |
| void | setFine (int fine) |
| Set the fine associated with the book. | |
| int | getDaysCheckedOut () const |
| Get the number of days the book has been checked out. | |
| void | setDaysCheckedOut (int daysCheckedOut) |
| Set the number of days the book has been checked out. | |
Represents a book in the library management system.
This class holds information about a book, including its title, author, genre, publication year, ISBN, availability status, fines, and days checked out. It provides methods to access and modify these properties, as well as to compare books and generate a detailed book description.
| Book::Book | ( | string | title, |
| string | author, | ||
| string | genre, | ||
| short | publicationYear, | ||
| long long | isbn, | ||
| bool | isAvailable ) |
Parameterized constructor for the Book class. Initializes a book with the provided details.
| title | Title of the book. |
| author | Author of the book. |
| genre | Genre of the book. |
| publicationYear | Year the book was published. |
| isbn | ISBN of the book. |
| isAvailable | Availability of the book (true if available). |
|
nodiscard |
Get the author of the book.
|
nodiscard |
Get the number of days the book has been checked out.
|
nodiscard |
Get the fine associated with the book.
|
nodiscard |
Get the genre of the book.
|
nodiscard |
Get detailed information about the book.

|
nodiscard |
Get the ISBN of the book.

|
nodiscard |
Get the publication year of the book.
|
nodiscard |
Get the title of the book.
|
nodiscard |
Check if the book is available.

| bool Book::operator< | ( | const Book & | b | ) | const |
Compare two books based on their ISBN.
| b | The book to compare with. |
| bool Book::operator== | ( | const Book & | b | ) | const |
Compare two books for equality based on their ISBN.
| b | The book to compare with. |
| void Book::setAuthor | ( | const string & | author | ) |
Set the author of the book.
| author | The new author for the book. |
| void Book::setDaysCheckedOut | ( | int | daysCheckedOut | ) |
Set the number of days the book has been checked out.
| daysCheckedOut | The new number of days the book has been checked out. |

| void Book::setFine | ( | int | fine | ) |
Set the fine associated with the book.
| fine | The new fine amount for the book. |
| void Book::setGenre | ( | const string & | genre | ) |
Set the genre of the book.
| genre | The new genre for the book. |
| void Book::setIsAvailable | ( | bool | isAvailable | ) |
Set the availability of the book.
| isAvailable | The new availability status of the book. |


| void Book::setIsbn | ( | long long | isbn | ) |
Set the ISBN of the book.
| isbn | The new ISBN for the book. |
| void Book::setPublicationYear | ( | short | publicationYear | ) |
Set the publication year of the book.
| publicationYear | The new publication year for the book. |
| void Book::setTitle | ( | const string & | title | ) |
Set the title of the book.
| title | The new title for the book. |