Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. public class Book {
  2.     private String title;
  3.     private int copies;
  4.     //Costruttore
  5.     public Book() {
  6.        
  7.     }
  8.     public Book(String titolo, int copie) {
  9.         this.title = titolo;
  10.         this.copies = copie;
  11.     }
  12.    
  13.     //Getter
  14.     public String getTitle() {
  15.         return this.title;
  16.     }
  17.     public int getCopies() {
  18.         return this.copies;
  19.     }
  20.    
  21.     //Setter
  22.     public void setTitle(String titolo) {
  23.         this.title = titolo;
  24.     }
  25.     public void setCopies(int copie) {
  26.         this.copies = copie;
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement