File tree Expand file tree Collapse file tree 2 files changed +6
-15
lines changed
Expand file tree Collapse file tree 2 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -13,19 +13,19 @@ public void calculation(){
1313 }
1414
1515 public void OperatorSetting (ArithmeticExpressionStack arithmeticExpressionStack ) {
16- ErrorException exception = new ErrorException ();
16+ ErrorException exceptionCheck = new ErrorException ();
1717 String firstString = arithmeticExpressionStack .pop ();
18- int firstNumber = exception .NumericalError (firstString );
18+ int cumulativeResult = exceptionCheck .NumericalError (firstString );
1919
2020 for (int i = 0 ; i <(arithmeticExpressionStack .getStackSize ())/2 ;i ++){
2121 String operator = arithmeticExpressionStack .pop ();
2222 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 );
2525 }
2626
27- if (firstNumber != 0 ){
28- message .calculationResult (firstNumber );
27+ if (cumulativeResult != 0 ){
28+ message .calculationResult (cumulativeResult );
2929 }
3030 init ();
3131 }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments