-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[찬인] 문자열 덧셈 계산기 #11
base: pci
Are you sure you want to change the base?
[찬인] 문자열 덧셈 계산기 #11
Conversation
|
||
import java.util.List; | ||
|
||
public interface SplitStrategy { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오와ㅣㅇ 이렇게 분리하는거 왜 생각못했지 ; .; 굿굿
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
당근이 제법 달군요..
|
||
public class Calculator { | ||
|
||
public static int calculate(String expression) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
박찬인씨의 정적클래스 선택기준이 궁금합니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
멤버변수에 대한 의존성이 없어서..?
SplitStrategy
는 인터페이스로 작성해야 하니까 그렇게 할수 없었구..
static
으로 작성하려면 default
메서드가 되야했으니까..!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이펙티브자바 140 페이지를 참고하여 기본생성자를 private 으로 명시하고 인스턴스화를 막아보는건 어떨까?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
와! 놓쳤던 부분 감사합니당
|
||
@DisplayName("null 또는 공백을 입력할 경우 0을 반환") | ||
@ParameterizedTest | ||
@NullAndEmptySource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오? null 이랑 "" 두개 검사하는건가
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넴 Stringd에 두 가지가 들어가지요!
No description provided.