| 6 | package entidad; |
| 7 | |
| 8 | public class Animal { |
| 9 | |
| 10 | private String nombre; |
| 11 | private String alimento; |
| 12 | private int edad; |
| 13 | private String raza; |
| 14 | |
| 15 | public Animal() { |
| 16 | } |
| 17 | |
| 18 | public Animal(String nombre, String alimento, int edad, String raza) { |
| 19 | this.nombre = nombre; |
| 20 | this.alimento = alimento; |
| 21 | this.edad = edad; |
| 22 | this.raza = raza; |
| 23 | } |
| 24 | |
| 25 | public void alimentarse() { |
| 26 | System.out.println(this.nombre + " se alimenta con " + this.alimento); |
| 27 | } |
| 28 | |
| 29 | public String getNombre() { |
| 30 | return nombre; |
| 31 | } |
| 32 | |
| 33 | public void setNombre(String nombre) { |
| 34 | this.nombre = nombre; |
| 35 | } |
| 36 | |
| 37 | public String getAlimento() { |
| 38 | return alimento; |
| 39 | } |
| 40 | |
| 41 | public void setAlimento(String alimento) { |
| 42 | this.alimento = alimento; |
| 43 | } |
| 44 | |
| 45 | public int getEdad() { |
| 46 | return edad; |
| 47 | } |
| 48 | |
| 49 | public void setEdad(int edad) { |
| 50 | this.edad = edad; |
| 51 | } |
| 52 | |
| 53 | public String getRaza() { |
| 54 | return raza; |
| 55 | } |
| 56 | |
| 57 | public void setRaza(String raza) { |
| 58 | this.raza = raza; |
| 59 | } |
| 60 | |
| 61 | } |
nothing calls this directly
no outgoing calls
no test coverage detected