File tree 2 files changed +6
-15
lines changed
2 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -13,19 +13,19 @@ public void calculation(){
13
13
}
14
14
15
15
public void OperatorSetting (ArithmeticExpressionStack arithmeticExpressionStack ) {
16
- ErrorException exception = new ErrorException ();
16
+ ErrorException exceptionCheck = new ErrorException ();
17
17
String firstString = arithmeticExpressionStack .pop ();
18
- int firstNumber = exception .NumericalError (firstString );
18
+ int cumulativeResult = exceptionCheck .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
- int secondNumber = exception .NumericalError (secondString );
24
- firstNumber = chooseOperatorAndCalculate (firstNumber , operator , secondNumber );
23
+ int secondNumber = exceptionCheck .NumericalError (secondString );
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
}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments