1#ifndef LIBRARYMANAGEMENT_BOOK_H
2#define LIBRARYMANAGEMENT_BOOK_H
43 [[nodiscard]]
const string &
getTitle()
const;
57 [[nodiscard]]
const string &
getAuthor()
const;
71 [[nodiscard]]
const string &
getGenre()
const;
99 [[nodiscard]]
long long getIsbn()
const;
143 [[nodiscard]]
string getInfo()
const;
150 [[nodiscard]]
int getFine()
const;
Represents a book in the library management system.
Definition Book.h:16
long long ISBN
The ISBN of the book.
Definition Book.h:178
void setDaysCheckedOut(int daysCheckedOut)
Set the number of days the book has been checked out.
Definition Book.cpp:212
int fine
The fine associated with the book.
Definition Book.h:180
void setGenre(const string &genre)
Set the genre of the book.
Definition Book.cpp:86
bool available
Availability status of the book.
Definition Book.h:179
Book()
Default constructor for the Book class. Initializes a book with default values.
Definition Book.cpp:10
const string & getTitle() const
Get the title of the book.
Definition Book.cpp:41
void setAuthor(const string &author)
Set the author of the book.
Definition Book.cpp:68
long long getIsbn() const
Get the ISBN of the book.
Definition Book.cpp:113
void setPublicationYear(short publicationYear)
Set the publication year of the book.
Definition Book.cpp:104
bool operator<(const Book &b) const
Compare two books based on their ISBN.
Definition Book.cpp:150
int getFine() const
Get the fine associated with the book.
Definition Book.cpp:185
string title
The title of the book.
Definition Book.h:174
void setFine(int fine)
Set the fine associated with the book.
Definition Book.cpp:194
string genre
The genre of the book.
Definition Book.h:176
string author
The author of the book.
Definition Book.h:175
short publicationYear
The year the book was published.
Definition Book.h:177
short getPublicationYear() const
Get the publication year of the book.
Definition Book.cpp:95
string getInfo() const
Get detailed information about the book.
Definition Book.cpp:169
void setIsbn(long long isbn)
Set the ISBN of the book.
Definition Book.cpp:122
const string & getAuthor() const
Get the author of the book.
Definition Book.cpp:59
void setTitle(const string &title)
Set the title of the book.
Definition Book.cpp:50
bool operator==(const Book &b) const
Compare two books for equality based on their ISBN.
Definition Book.cpp:160
const string & getGenre() const
Get the genre of the book.
Definition Book.cpp:77
int daysCheckedOut
The number of days the book has been checked out.
Definition Book.h:181
bool isAvailable() const
Check if the book is available.
Definition Book.cpp:131
int getDaysCheckedOut() const
Get the number of days the book has been checked out.
Definition Book.cpp:203
void setIsAvailable(bool isAvailable)
Set the availability of the book.
Definition Book.cpp:140