Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package librarycatalogue;
- public class Book {
- //Properties, fields,
- String title;
- int pageCount;
- int ISBN;
- boolean isCheckedOut;
- int dayCheckedOut = -1;
- //Constuctor
- public Book(String bookTitle, int bookPageCount, int bookISBN) {
- this.title = bookTitle;
- this.pageCount = bookPageCount;
- isCheckedOut = false;
- }
- //Getters
- public String getTitle() {
- return this.title;
- }
- public int pageCount() {
- return this.pageCount;
- }
- public int getISBN() {
- return this.ISBN;
- }
- public boolean getIsCheckedOut() {
- return this.isCheckedOut;
- }
- public int getdayCheckedOut() {
- return this.dayCheckedOut;
- }
- //Setters
- public void setIsCheckedOut(boolean newIsCheckedOut, int currentDayCheckedOut) {
- setDayCheckedOut(currentDayCheckedOut);
- }
- private void setDayCheckedOut(int day) {
- this.dayCheckedOut = day;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement