File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -15,17 +15,17 @@ public void calculation(){
15
15
public void OperatorSetting (ArithmeticExpressionStack arithmeticExpressionStack ) {
16
16
ErrorException exception = new ErrorException ();
17
17
String firstString = arithmeticExpressionStack .pop ();
18
- int firstNumber = exception .NumericalError (firstString );
18
+ int cumulativeResult = exception .NumericalError (firstString );
19
19
20
20
for (int i = 0 ; i <(arithmeticExpressionStack .getStackSize ())/2 ;i ++){
21
21
String operator = arithmeticExpressionStack .pop ();
22
22
String secondString = arithmeticExpressionStack .pop ();
23
23
int secondNumber = exception .NumericalError (secondString );
24
- firstNumber = chooseOperatorAndCalculate (firstNumber , operator , secondNumber );
24
+ cumulativeResult = chooseOperatorAndCalculate (cumulativeResult , operator , secondNumber );
25
25
}
26
26
27
- if (firstNumber != 0 ){
28
- message .calculationResult (firstNumber );
27
+ if (cumulativeResult != 0 ){
28
+ message .calculationResult (cumulativeResult );
29
29
}
30
30
init ();
31
31
}
You can’t perform that action at this time.
0 commit comments