diff --git a/src/main/java/calculator/controller/CalculatorController.java b/src/main/java/calculator/controller/CalculatorController.java index 455af28aa5..6532bf8816 100644 --- a/src/main/java/calculator/controller/CalculatorController.java +++ b/src/main/java/calculator/controller/CalculatorController.java @@ -17,7 +17,7 @@ public void input() { } private void output(String s) { - int sum = calculatorService.sum(s); + int sum = calculatorService.add(s); System.out.println("결과 : " + sum); } diff --git a/src/main/java/calculator/service/CalculatorService.java b/src/main/java/calculator/service/CalculatorService.java index 28442b528a..6f5ab39132 100644 --- a/src/main/java/calculator/service/CalculatorService.java +++ b/src/main/java/calculator/service/CalculatorService.java @@ -9,7 +9,7 @@ public class CalculatorService { /** * 덧셈 로직을 순차적으로 진행한다. */ - public int sum(String s) { + public int add(String s) { this.s = s; boolean hasCustomSeparator = checkCustomSeparator(); String[] separatedString = separate(hasCustomSeparator);