MCPcopy Create free account
hub / github.com/JerePrograma/FullStackEgg / Animal

Class Animal

Etapa3Herencia/Ejercicio1R/src/entidad/Animal.java:8–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6package entidad;
7
8public abstract class Animal {
9
10 protected String nombre;
11 protected String alimento;
12 protected int edad;
13 protected 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 String getNombre() {
26 return nombre;
27 }
28
29 public void setNombre(String nombre) {
30 this.nombre = nombre;
31 }
32
33 public String getAlimento() {
34 return alimento;
35 }
36
37 public void setAlimento(String alimento) {
38 this.alimento = alimento;
39 }
40
41 public int getEdad() {
42 return edad;
43 }
44
45 public void setEdad(int edad) {
46 this.edad = edad;
47 }
48
49 public String getRaza() {
50 return raza;
51 }
52
53 public void setRaza(String raza) {
54 this.raza = raza;
55 }
56
57 public abstract void alimento();
58}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected