Let's say I have an animal and now I want to make it a dog. How do I go about doing this in java?
Right now I have a constructor that looks like
public Dog(Animal animal) {
this.setProperty(animal.getProperty);
...
}
While this works, it's fragile. Any other suggestions?