Advertisement
Dackwoon

Ej 4 Biblioteca

May 15th, 2022
720
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.00 KB | None | 0 0
  1.     public class Biblioteca {
  2.      private int pagBook,datepublish;
  3.      private long ISBN;
  4.      private String title,autor,editorial;
  5.     public long getISBN() {
  6.         return ISBN;
  7.     }
  8.     public int getPagBook() {
  9.         return pagBook;
  10.     }
  11.     public int getDatepublish() {
  12.         return datepublish;
  13.     }
  14.     public String getTitle() {
  15.         return title;
  16.     }
  17.     public String getAutor() {
  18.         return autor;
  19.     }
  20.     public String getEditorial() {
  21.         return editorial;
  22.     }
  23.     public void setISBN(int ISBN) {
  24.         long max=9999999999l,min=100000000l;
  25.         if (ISBN<=max && ISBN>=min )    {
  26.             this.ISBN = ISBN;
  27.         }
  28.        
  29.     }
  30.     public void setPagBook(int pagBook) {
  31.         if(pagBook>0) {
  32.             this.pagBook = pagBook;
  33.         }
  34.    
  35.     }
  36.     public void setDatepublish(int datepublish) {
  37.         this.datepublish = datepublish;
  38.     }
  39.     public void setTitle(String title) {
  40.         this.title = title;
  41.     }
  42.     public void setAutor(String autor) {
  43.         this.autor = autor;
  44.     }
  45.     public void setEditorial(String editorial) {
  46.         this.editorial = editorial;
  47.     }
  48.    
  49.  
  50.    
  51.    
  52.        
  53.     }
  54.      
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement