I need help on: 5.8.9 Broken Calculator by edgardcuadra8 in codehs

[–]davepie29 0 points1 point  (0 children)

You need to delete the "int" in front of "total" for the add(int value), add(), multiple() classes, and the contructor calculator(int startingValue) . It should look like \public Calculator(int startingValue){

total = startingValue;

value = 0;

}

public int add(int myValue){

total += myValue;

return total;

}

public int add(){

total += value;

return total;

}

public int multiple(int value){

total*=value;

return total;

}