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

통화? #22

Closed
BBBOMi opened this issue Jul 9, 2020 · 0 comments · Fixed by #23
Closed

통화? #22

BBBOMi opened this issue Jul 9, 2020 · 0 comments · Fixed by #23

Comments

@BBBOMi
Copy link
Owner

BBBOMi commented Jul 9, 2020

  1. 해결하고자 하는 목표
    • 통화 개념 도입

  1. 해당 이슈에서 한 작업
    • 큰 설계 아이디어를 다루려다 더 작은 작업을 수행.
    • 다른 부분들을 호출자(팩토리 메서드)로 옮김으로써 두 생성자를 일치 시킴.
    • 비슷한 리팩토링(Franc에 했던 일을 Dollar에도 적용)을 한 번의 큰 단계로 처리.
    • 동일한 생성자들을 상위 클래스로 올렸음.
@BBBOMi BBBOMi added the step label Jul 9, 2020
@BBBOMi BBBOMi added this to In progress in 1부 다중 통화 산술(Multi-Currency Arithmetic) via automation Jul 9, 2020
BBBOMi added a commit that referenced this issue Jul 9, 2020
BBBOMi added a commit that referenced this issue Jul 9, 2020
- 슈퍼 클래스에 통화 코드를 확인할 수 있는 추상 메서드 생성
- 각각 클래스에서 맞는 통화 코드를 리턴하도록 재정의
BBBOMi added a commit that referenced this issue Jul 9, 2020
- 코드를 인스턴스 변수에 저장하고, 메서드에서는 단순 반환하게 함.
- 두 클래스를 모두 포함할 수 있는 동일한 구현임.
BBBOMi added a commit that referenced this issue Jul 9, 2020
- Franc과 Dollar의 공통 메서드를 부모 클래스로 이동
- 테스트 코드 통과 실패
BBBOMi added a commit that referenced this issue Jul 9, 2020
- 생성자를 이용하는 코드 변경
BBBOMi added a commit that referenced this issue Jul 9, 2020
- Franc에서 사용하던 문자열 코드를 팩토리 메서드에서 사용
- Franc은 팩토리 메서드에서 사용하는 코드를 이용하여 객체 생성
BBBOMi added a commit that referenced this issue Jul 9, 2020
- 하위 클래스의 동일한 생성자를 상위 클래스로 이동
BBBOMi added a commit that referenced this issue Jul 9, 2020
- 상위 클래스의 생성자를 이용하도록 변경
- 테스트 통과 확인
@BBBOMi BBBOMi linked a pull request Jul 9, 2020 that will close this issue
@BBBOMi BBBOMi closed this as completed in #23 Jul 9, 2020
1부 다중 통화 산술(Multi-Currency Arithmetic) automation moved this from In progress to Done Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

1 participant