So I have this class called Card, in this class I have an Image, I then have several other classes that are inheriting this class and those classes as well.
I have decided to create a new class that extends Image instead now though and use that instead of the Image class in my parent Card class. However, because of this it has messed up all of the other classes that are passing in an Image variable.
Do I need to change all of the instances of the old Image class to the new CardImage class or is there another way around this?
Example:
public class A {
private Image image;
public A(Image image){
this.image = image;
}
}
public class B extends A{
public B(Image image){
super(image);
}
}
public class CardImage extends Image{
public CardImage(){
}
}