Skip to content

Commit

Permalink
refactor:CalculatorService 클래스의 sum() -> add() 로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
whrjsgml0000 committed Oct 20, 2024
1 parent e9e5596 commit f5514b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/calculator/service/CalculatorService.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f5514b5

Please sign in to comment.