-
Notifications
You must be signed in to change notification settings - Fork 1
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
[1차 VER1.0] Java ToyProject upload by TaeIlKIM #14
base: main
Are you sure you want to change the base?
Conversation
|
||
private Customers() {}; | ||
|
||
public void refresh() { |
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.
refresh 메서드를 오버로딩해서 한 고객에 대해서만 업데이트하는 메서드가 있으면 좋을 것 같습니다!
고객 한 명을 추가했는데 모든 고객을 refresh한다면 비효율적이니까요 😀
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.
그런 생각 안해봤는데, 참고해보겠습니다~
return customerArrs; | ||
} | ||
|
||
public Comparator<Customer> sortName(int num) { |
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.
람다식으로 할 생각은 전혀 못했었는데 덕분에 하나 배워갑니다!👍
try { | ||
System.out.println("Input Customer's Spent Time: "); | ||
Integer time = Integer.parseInt(nextLine(Message.END_MSG)); | ||
if (time < 0) throw new InputRangeException(); |
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.
setter에 해당 조건이 들어가면 더 좋을 것 같다는 생각이 듭니다!
다른데서 해당 조건 없이 setter를 쓴다면 결국 잘못된 값이 입력이 되지 않을까요?!
코드리뷰 부탁드립니다.
긴 코드 인데 읽어주셔서 너무 감사합니다! 🙏
TODO - Refactoring