Advertisement
Guest User

Untitled

a guest
Dec 27th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. package librarycatalogue;
  2.  
  3. public class Book {
  4.  
  5. //Properties, fields,
  6. String title;
  7. int pageCount;
  8. int ISBN;
  9. boolean isCheckedOut;
  10. int dayCheckedOut = -1;
  11.  
  12. //Constuctor
  13. public Book(String bookTitle, int bookPageCount, int bookISBN) {
  14. this.title = bookTitle;
  15. this.pageCount = bookPageCount;
  16. isCheckedOut = false;
  17.  
  18. }
  19.  
  20. //Getters
  21. public String getTitle() {
  22. return this.title;
  23. }
  24. public int pageCount() {
  25. return this.pageCount;
  26. }
  27. public int getISBN() {
  28. return this.ISBN;
  29. }
  30. public boolean getIsCheckedOut() {
  31. return this.isCheckedOut;
  32. }
  33. public int getdayCheckedOut() {
  34. return this.dayCheckedOut;
  35. }
  36.  
  37. //Setters
  38. public void setIsCheckedOut(boolean newIsCheckedOut, int currentDayCheckedOut) {
  39. setDayCheckedOut(currentDayCheckedOut);
  40. }
  41. private void setDayCheckedOut(int day) {
  42. this.dayCheckedOut = day;
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement