I keep failing the last test which should divide a and b correctly and I'm not sure why. Would very much appreciate the help.
Error description:
divide() method is not dividing 4020 & 4035 correctly
public class ArithmeticWrapper {
private static class Arithmetic{
private int a;
private int b;
public Arithmetic(int a, int b){
this.a = a;
this.b = b;
}
public int getA(){
return a;
}
public void setA(int a){
this.a = a;
}
public int getB(){
return b;
}
public void setB(int b){
this.b = b;
}
public int add(){
return a + b;
}
public int subtract(){
return a - b;
}
public int multiply(){
return a * b;
}
public double divide(){
return (double) a / (double) b;
}
}
public static class Calculator extends Arithmetic{
public Calculator(int a, int b){
super(a, b);
}
}
}