Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. /**
  2. * Created by daan on 1/13/2017.
  3. */
  4. public class Boek {
  5. private int ISBNnumber;
  6. private String title;
  7. private int amountofPages;
  8. private String author;
  9.  
  10. public Boek(int ISBNnumber, String title, int amountofPages, String author){
  11. this.ISBNnumber = ISBNnumber;
  12. this.title = title;
  13. this.amountofPages = amountofPages;
  14. this.author = author;
  15. }
  16.  
  17. public int getISBNnumber() {
  18. return ISBNnumber;
  19. }
  20.  
  21. public void setISBNnumber(int ISBNnumber) {
  22. this.ISBNnumber = ISBNnumber;
  23. }
  24.  
  25. public String getTitle() {
  26. return title;
  27. }
  28.  
  29. public void setTitle(String title) {
  30. this.title = title;
  31. }
  32.  
  33. public int getAmountofPages() {
  34. return amountofPages;
  35. }
  36.  
  37. public void setAmountofPages(int amountofPages) {
  38. this.amountofPages = amountofPages;
  39. }
  40.  
  41. public String getAuthor() {
  42. return author;
  43. }
  44.  
  45. public void setAuthor(String author) {
  46. this.author = author;
  47. }
  48.  
  49. @Override
  50. public String toString(){
  51. return "Book " + getTitle() + " has " + amountofPages + " pages and has been written by " + author + " with ISBN number: " + getISBNnumber();
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement