So i have an abstract class:
public abstract class Superclass {
private final boolean isTrue;
private final int number1;
private final int number2;
private final int number3;
public Superclass(boolean isTrue, int number1, int number2, int number3) {
this.isTrue = isTrue;
this.number1 = Math.abs(number1);
this.number2 = Math.abs(number2);
this.number3 = Math.abs(number3);
}
On top of that i created a subclass of "Superclass" which is supposed to have 2 public constructors:
public class Subclass extends Superclass{
public Subclass(int number2, int number3) {
...
}
public Subclass(int number1, int number2, int number3) {
...
}
Now i dont know what i should write inside of those contructors to make them work, because i think have to call super(isTrue, number1, number2, number3) and thats obviously not possible. I dont want to add any additional attributes to the subclass. Is there any way to make that work? Thanks already in advance :)