Skip to content
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

[야구] 노민정 미션 제출합니다 #5

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

ninaaano
Copy link

No description provided.

if (!userInput.matches(IS_NUMBER)) {
throw new IllegalArgumentException("[ERROR]" + CHECK_STRING);
}
int size = Integer.parseInt(userInput);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

size를 변환을 하셔야하는데 입력값이 size로 들어갔습니다.

Copy link

@jiggyjiggy jiggyjiggy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exception을 따로 관리하고 일관성있게 throw로 다시 던지는 구성 좋습니다


public static final int INPUT_LENGTH = 3;

public static final String IS_NUMBER = "[0-9]*";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NUMBER_PATTERN 의 컨벤션이 적절해 보입니다


import java.util.List;

public class Compare {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

클래스명은 명사형으로 작성해주시는게 좋을 것 같아요


import static java.util.stream.Collectors.toList;

public class CreateNumber {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

클래스 네이밍 컨벤션에는 NumberCreator가 적절해 보입니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants