WallHero

TP03E06ClassDocument

Oct 16th, 2020
1,135
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package punto;
  2.  
  3. public class Document {
  4.    
  5.     private String name;
  6.     private int sheet;
  7.     private String size;
  8.     private int copies;
  9.     private String preferences;
  10.    
  11.     public Document(String name, int sheet, String size, int copies, String preferences) {
  12.         this.name = name;
  13.         this.sheet = sheet;
  14.         this.size = size;
  15.         this.copies = copies;
  16.         this.preferences = preferences;
  17.     }
  18.  
  19.     public Document() {
  20.     }
  21.  
  22.     @Override
  23.     public String toString()
  24.     {
  25.         return "Nombre documento: " + name + "\nHojas:"+ this.sheet+ "\nHojas totales: "+ (this.sheet*this.copies) + "\nTamaño: " +size + "\nCopias: " + this.copies + "\nPreferencia: " + preferences;
  26.        
  27.     }
  28.  
  29.     public String getName() {
  30.         return name;
  31.     }
  32.     public void setName(String name) {
  33.         this.name = name;
  34.     }
  35.     public int getSheet() {
  36.         return sheet;
  37.     }
  38.     public void setSheet(int sheet) {
  39.         this.sheet = sheet;
  40.     }
  41.     public String getSize() {
  42.         return size;
  43.     }
  44.     public void setSize(String size) {
  45.         this.size = size;
  46.     }
  47.     public int getCopies() {
  48.         return copies;
  49.     }
  50.     public void setCopies(int copies) {
  51.         this.copies = copies;
  52.     }
  53.     public String getPreferences() {
  54.         return preferences;
  55.     }
  56.     public void setPreferences(String preferences) {
  57.         this.preferences = preferences;
  58.     }
  59. }
  60.  
RAW Paste Data