[1차 VER1.0] Java ToyProject upload by JuheeKang#12
Open
a07224 wants to merge 2 commits intoFastCampusKDTBackend:mainfrom
Open
[1차 VER1.0] Java ToyProject upload by JuheeKang#12a07224 wants to merge 2 commits intoFastCampusKDTBackend:mainfrom
a07224 wants to merge 2 commits intoFastCampusKDTBackend:mainfrom
Conversation
seonghye0n
reviewed
May 10, 2023
| // refresh 함수가 호출되는 경우 | ||
| // 1. 분류기준 바뀔 때 | ||
| // 2. 새로운 고객이 들어올 때 | ||
| public void refresh() { |
There was a problem hiding this comment.
refresh 메서드를 오버로딩해서 한 고객에 대해서만 업데이트하는 메서드가 있으면 좋을 것 같습니다!
고객 한 명을 추가했는데 모든 고객을 refresh한다면 비효율적이니까요 😀
seonghye0n
reviewed
May 11, 2023
| this.totalTime = totalTime; | ||
| this.totalPay = totalPay; | ||
| } | ||
| public Customer(String cName, String cId, Integer totalTime, Integer totalPay, Group group) { |
There was a problem hiding this comment.
해당 생성자를 통해 기준에 맞지 않는 그룹을 넣을 수 있지 않을까라는 생각이 듭니다!
seonghye0n
reviewed
May 11, 2023
| public static Groups getInstance(){ | ||
| if(allGroups == null){ | ||
| allGroups = new Groups(); | ||
| allGroups.add(new Group(new Parameter(), GroupType.NONE)); |
There was a problem hiding this comment.
저는 run할때 추가해줬었는데 getInstance에 넣을 생각을 못했네요..
덕분에 배워갑니다!👍
seonghye0n
reviewed
May 11, 2023
| System.out.println("Input Customer's Spent Time:"); | ||
| try{ | ||
| String time = nextLine(Message.END_MSG); | ||
| customer.setTotalTime(Integer.parseInt(time)); |
seonghye0n
reviewed
May 11, 2023
| System.out.printf("Input Minimum Spent Time:"); | ||
| String spentTime = nextLine(Message.END_MSG); | ||
| Parameter parameter = group.getParameter(); | ||
| parameter.setMinTime(Integer.parseInt(spentTime)); |
There was a problem hiding this comment.
Customer, Parameter의 시간, 금액 입력에 대해서 -값은 입력이 안되게 막으면 더 좋을 것 같습니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
아직 예외처리하는 부분이 어려운것같습니다ㅠ
확인해주셔서 감사합니다 !