GatoBooster

Animal Prueba2Sem2018

Apr 7th, 2019
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.30 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package prueba2sem2018;
  7.  
  8. /**
  9.  *
  10.  * @author gatob
  11.  */
  12. public class Animal {
  13.     //Declaración Variables de Instancia
  14.     private String nombreA;
  15.     private String tipoA;
  16.     private int meses;
  17.     private int cantVacunas;
  18.    
  19.     //Constructor
  20.     public Animal(String nombreA, String tipoA, int meses, int cantVacunas){
  21.         this.nombreA = nombreA;
  22.         this.tipoA = tipoA;
  23.         this.meses = meses;
  24.         this.cantVacunas = cantVacunas;
  25.     }
  26.    
  27.     //Set and Get
  28.     public void setNombreA(String nombreA){
  29.         this.nombreA = nombreA;
  30.     }
  31.    
  32.     public String getNombreA(){
  33.         return nombreA;
  34.     }
  35.    
  36.     public void setTipoA(String tipoA){
  37.         this.tipoA = tipoA;
  38.     }
  39.    
  40.     public String getTipoA(){
  41.         return tipoA;
  42.     }    
  43.    
  44.     public void setMeses(int meses){
  45.         this.meses = meses;
  46.     }
  47.    
  48.     public int getMeses(){
  49.         return meses;
  50.     }
  51.  
  52.     public void setCantVacunas(int cantVacunas){
  53.         this.cantVacunas = cantVacunas;
  54.     }
  55.    
  56.     public int getCantVacunas(){
  57.         return cantVacunas;
  58.     }        
  59. }
Advertisement
Add Comment
Please, Sign In to add comment