Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. package pl.coderslab.mvc;
  2.  
  3. public class Book {
  4.  
  5. private String title;
  6. private String author;
  7. private int isbn;
  8.  
  9. public String getTitle() {
  10. return title;
  11. }
  12.  
  13. public String getAuthor() {
  14. return author;
  15. }
  16.  
  17. public int getIsbn() {
  18. return isbn;
  19. }
  20.  
  21. public Book(String title, String author, int isbn) {
  22. super();
  23. this.title = title;
  24. this.author = author;
  25. this.isbn = isbn;
  26. }
  27.  
  28.  
  29. @Override
  30. public String toString() {
  31. return "Tytul: " + this.getTitle() + " Autor: " + this.getAuthor() + " ISBN: " + this.getIsbn();
  32. }
  33.  
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement