I am a beginner in terms of OOP, and right now I am doing a code for a veterinarian where I have to make an arrangement of objects and put animal data.
This is the parent class (which, as you can see is Abstract)
package veterinaria;
public abstract class Animal {
private String nombre;
private int edad;
private int estatura;
private String sexo;
private String color;
private int peso;
Animal () {}
And apart there are 6 classes daughter, Dog, Cat, Reptile, Rodent, Bird and Fish, all these with their exclusive variables and their Getters and Setters.
public class Perro extends Animal {
public Perro () {
super();
}
protected byte numPatas;
protected String raza;
protected String vacunas;
protected String pedigree;
My doubt in this case is, if I want to put different animal data in a single arrangement of objects, what could I do in this case?
Before I ask the user to enter what animal you want to enter