-
Notifications
You must be signed in to change notification settings - Fork 55
[황명하_BackEnd] 1주차 과제 제출합니다 #49
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
base: main
Are you sure you want to change the base?
Conversation
dradnats1012
left a comment
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.
사용하지 않는 클래스 같은데 지워주면 좋을 것 같아요!
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.
지웠습니다!
| { | ||
| // TODO: 프로그램 구현 | ||
|
|
||
| Scanner sc = new Scanner(System.in); |
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.
미션 요구사항에 나와있는 Console.readLine() 을 사용해주세요!
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 Application | ||
| { | ||
| public static void main(String[] args) |
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.
main 메서드 내에서 너무 많은 역할을 가지고 있는 것 같아요!
각 코드의 역할을 좀 더 알아보기 쉽게 메서드를 분리해보는게 어떨까요?
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.
분리완료했습니다!
| cars.add(new Car(name)); | ||
| } | ||
|
|
||
| int count=sc.nextInt(); |
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.
이상한 입력이 들어오면 어떻게 될까요?
| if(car.getPosition()>win) { | ||
| win = car.getPosition(); | ||
| } |
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.
depth가 깊어지는것 같은데 메서드로 뺄 수 있을 것 같아요~!
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.
분리했습니다!
| winCars.add(car.getName()); | ||
| } | ||
| } | ||
| System.out.print("winner"+String.join(", ",winCars)); |
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.
ctrl + alt + L 을 통해서 라인정렬을 해 줄 수 있습니다 !
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.
라인정렬 완료했습니다!
| if (name.length() > 5) | ||
| { | ||
| throw new IllegalArgumentException("5자 이하만"); | ||
|
|
||
| } |
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.
메서드로 뺐습니다!
No description provided.