-
Notifications
You must be signed in to change notification settings - Fork 1
[1차 VER1.0] Java ToyProject upload by JeonghoSong #26
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
MainMenu, Customer, Group 구현 완료 SummaryMenu 미완성
SummaryMenu 기능 구현 완료
수정01 Menu 인터페이스의 chooseMenu() 메서드에 NumberFormatException 예외를 추가 하였습니다. 수정02 findGroupOfCustomer() 메서드에서 allGroups이 요소를 불러오지 못했습니다. Groups 클래스의 생성자에 Group 객체를 추가하여 정상적으로 allGroups를 불러올 수 있도록 처리 하였습니다. 문제01 CustomerMenu -> makeCustomer() 메서드에서 String을 int로 파싱할 경우 예외 발생시 NumberFormatException으로 핸들링 하기에 까다로움을 발견 했습니다. try-catch를 하거나, parseInt() 대신 custom 메서드를 만들어 감싸줘야 겠다는 생각을 했습니다.
수정01 Groups 클래스의 생성자에서 기존 allGroups.add() 코드를 삭제 하였습니다. 수정02 Groups 클래스의 getInstance() 메서드에서 allGroups.add() 코드를 추가 하였습니다. 확인01 NONE Type으로 allGroups.add() 메서드 초기화 후, GroupsMenu에서 setParameter 수행 시 refresh()를 거쳐 다른 Type의 Group가 정상적으로 CustomerMenu.viewCustomer()에서 잡히는지 확인 하였습니다. -> 성공 문제01 CustomerMenu.viewCustomer() 실행 시 customerId='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.
주식 부분이 정호님이, 똑같은 주석의 코드 내용이 가져오신 부분인가요~?
제 생각에는 정호님도 충분히 하실 수 있는 수준이라고 생각되는데 시간이 좀 부족했던 것 같아요.
지금 공부하기에 딱 좋은 연습물인거 같으니 과제 끝나더라도 한번 다시 도전해보셨으면 좋겠네요 😊
* if문 안에서는 인덱스 값이 유효하지 않은 경우에 대한 예외 처리 담당 | ||
*/ | ||
@Override | ||
public T get(int index) throws IndexOutOfBoundsException { |
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.
꼼꼼한 예외처리 좋습니다!!!
어떤 경우 throw로 터트리는게 좋고, 또 어떤 경우 throws로 넘길까 고민해보는거 되게 좋은 것 같아요 👍
this.customerTotalPay = customerTotalPay; | ||
} | ||
|
||
public void getCustomerInfo() { |
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.
오잉?
혼자서 코드 구현을 해보려 하다 안돼서 지웠다 다시 쓰고를 반복 했습니다. 기능에 대한 메서드 구현은 모두 했지만 아직 전체적으로 앱이 불안정합니다. 그리고 구현이 안되는 기능 부분은 급한대로 어쩔 수 없이 다른 분의 코드를 이용해서라도 만들었습니다.
전반적으로 불완전한 만큼 추후 지속적으로 안정화를 위해 코드를 계속 수정 하겠습니다.