forked from woowacourse/java-chicken-2019
-
Notifications
You must be signed in to change notification settings - Fork 28
[치킨 POS 미션] 고준보 미션 제출합니다. #2
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
Open
Ridealist
wants to merge
57
commits into
master
Choose a base branch
from
Ridealist
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
8def694
docs: 구현할 기능 목록 작성
Ridealist e63159f
fix: gradle java 버전 세팅 변경
Ridealist a6d76ab
feat(Order): 주문 클래스 구현
Ridealist 7c736db
feat(OrderRepository): 전체 주문 내역 저장 클래스 구현
Ridealist 41e50d7
chore: gradle 세팅 변경
Ridealist d96ca84
feat(View): InputView 및 OutputView 프로그램 첫 실행 화면 구성 메소드 추가
Ridealist a535e97
refactor(Order): menuAmount로 인스턴스 필드 이름 수정
Ridealist c0101cb
refactor(OutputView): 메소드 이름 명료화, 줄바꿈 추가
Ridealist 9c94528
feat(InputView): 주문 등록 기능 관련 메소드 추가
Ridealist 02d610e
feat(Table): Repository에서 테이블 이름 기준으로 테이블 찾는 기능 추가
Ridealist 206c96d
feat(Menu): Repository에서 메뉴 번호 기준으로 메뉴 찾는 기능 추가
Ridealist 232833d
feat(OrderRepository): 새로운 Order 객체 저장 및 전체 목록 조회 기능 추가
Ridealist 7afca7c
refactor(InputView): nextstep Console 클래스 적용
Ridealist 762434d
feat: Repository에 저장된 모든 객체 ID(number)값 가져오는 기능 구현
Ridealist e3efc80
feat: 메인화면 입력값 유효성 검증 로직 구현
Ridealist 1fe335f
feat: 테이블 선택 및 메뉴 등록 기능 유효성 검증 로직 구현
Ridealist 6e145c7
feat(View): 결제하기 기능을 위한 입출력 메서드 구현
Ridealist 451e894
feat(Pay): 결제방식에 따른 할인율 Enum 클래스 구현
Ridealist 0d2f81f
fix: 잘못된 입력에 대한 에러 메세지 내용 수정
Ridealist a256864
feat(Pay): 결제 금액을 계산하는 클래스 구현
Ridealist 681eb52
feat(OutputView): 최종 결제 금액 출력 메서드 구현
Ridealist 8bbea56
feat(PosController): 메뉴 기능별 실행 메소드 로직 관리 클래스 구현
Ridealist 3e98604
feat(Command): 메인 메뉴 선택 관리하는 Enum 클래스 추가
Ridealist fa86222
refactor(View): Command 클래스 적용해 출력 로직 단순화
Ridealist 8788d18
feat(MenuController): 메인 메뉴 선택 관리하는 클래스 구현
Ridealist 49d84ee
refactor(Application): MenuController 클래스 적용
Ridealist a5bf6bf
docs: README 현재까지 구현 사항 체크
Ridealist 6d88b50
feat(Pay): 주문 내역으로 부터 주문 사항 통계 내는 메서드 구현
Ridealist 8ac8d69
refactor: Pay 변경사항 반영
Ridealist 6123a32
chore: 필요없는 import 패키지 제거
Ridealist 39d1f79
feat(OutputView): 주문한 테이블에 대해 표시 기능 구현
Ridealist 4bdc383
fix(PayMethod): 주문 방법에 따른 할인률 오류 수정
Ridealist 4167459
fix(OrderRepository): 메뉴 당 개수가 아닌 전체 개수 기준 계산 오류 해결
Ridealist 6ba5156
fix(OutputView): 결제 시 수량을 곱한 메뉴당 전체 금액이 출력되도록 수정
Ridealist fc6aa5c
fix(Pay): 주문 내역이 없는 테이블도 결제 가능한 오류 해결
Ridealist 5a96d9e
chore: 해결된 TODO 리스트 제거
Ridealist c6c2d4e
docs: 전체 기능 1차 구현 완료_1시간 반정도 오버 됨
Ridealist d2aa3fe
chore: TODO 리스트 추가
Ridealist 2512285
refactor(Command): 기능 선택 입력에 대한 유효성 검증 책임 추가 및 메서드 구현
Ridealist ca4f801
refactor(InputView): 입력 후 띄어쓰기 기능을 제너릭 메서드로 일괄 처리
Ridealist 7c2e1c8
refactor(InputView): InputValidator 삭제, 유효성 검증 InputView 내부 메서드 및 도메인…
Ridealist 6e8ac09
refactor(Repository): 불필요한 메서드 제거, 유효성 검증 로직 내부 메서드에서 구현
Ridealist a5ac038
refactor(Order): 최대 주문 가능 수량 유효성 검증 로직 내부화
Ridealist 9bdd561
refactor(Order): 필요 없는 로직 제거, 기능 순서에 따라 메서드 순서 조정
Ridealist b8c352d
refactor(Command): 입력값 검증 로직 내부화를 위한 파라미터 타입 변경
Ridealist fcd1f3b
refactor(PosController): 메서드 분리, 메서드 이름 명료화, 트랜잭션 단위 기준 메서드 구현
Ridealist f9567da
refactor(Pay): 논리적 흐름에 따라 메서드 순서 조정
Ridealist 77c0dfb
refactor(OutputView): 메서드 파라미터 변경 적용, 에러 메세지 이후 한 줄 띄어쓰기 추가
Ridealist bc1d88c
fix(MenuController): 등록된 주문이 없을 경우에 대한 예외 처리 추가, Command Enum 적용, 메서드 분리
Ridealist 88c57ef
refactor: domain 패키지 내 세부 패키지 분리
Ridealist 5038b0a
test(ApplicationTest): 어플리케이션 Integration Test 구현
Ridealist 26f335f
test(Application): 주문 최대 가능 수량 초과 에러 테스트 추가
Ridealist dd357eb
test(Repository): 번호 기준 데이터 가져오는 메서드 테스트 구현
Ridealist 995f009
test(Order): 최대 주문 가능 수량 초과 에러 테스트 구현
Ridealist 45f1c37
test(OrderRepository): 쿼리 메소드들에 대한 단위 테스트 구현
Ridealist 4f9b56a
test(Pay): 결제 관련 메서드 단위 테스트 구현
Ridealist 7b574dd
test(PayMethod): 결제 수단 유효성 검증, 결제 수단에 따른 할인률 단위 테스트 구현
Ridealist File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,22 @@ | ||
| apply plugin: 'java' | ||
| apply plugin: 'eclipse' | ||
|
|
||
| version = '1.0.0' | ||
| sourceCompatibility = 1.8 | ||
| plugins { | ||
| id 'java' | ||
| } | ||
|
|
||
| repositories { | ||
| mavenCentral() | ||
| maven { url 'https://jitpack.io' } | ||
| } | ||
|
|
||
| dependencies { | ||
| testCompile('org.junit.jupiter:junit-jupiter:5.5.2') | ||
| testCompile('org.assertj:assertj-core:3.14.0') | ||
| } | ||
| implementation 'com.github.woowacourse-projects:mission-utils:1.0.0' | ||
| } | ||
|
|
||
| java { | ||
| toolchain { | ||
| languageVersion = JavaLanguageVersion.of(11) | ||
| } | ||
| } | ||
|
|
||
| test { | ||
| useJUnitPlatform() | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # 구현할 기능 목록 | ||
|
|
||
| - 간단한 포스(POS) 프로그램을 구현한다 | ||
|
|
||
| ## 1. 주문등록 | ||
|
|
||
| ### 메뉴 | ||
| - (메뉴 기본 정보) | ||
| - [x] 메뉴 번호 | ||
| - [x] 종류 | ||
| - [x] 이름 | ||
| - [x] 가격 | ||
|
|
||
| ### 테이블 | ||
| - (테이블 기본 정보) | ||
| - [x] 테이블 번호 | ||
| - [x] 테이블 당, 한 메뉴 최대 주문 가능 수량 99개 | ||
| - [x] 주문이 등록된 테이블은 결제가 이루어지기 전까지 테이블 목록에 별도로 표시 | ||
|
|
||
| ## 2. 결제 | ||
|
|
||
| - 결제 유형에 따라 할인율이 달라진다 | ||
| - [x] 치킨 종류 메뉴의 수량의 합이 10개가 넘는 경우 10,000원씩 할인된다 | ||
| - ex) 10개는 10,000원 할인, 20개는 20,000원 할인 | ||
| - [x] 현금 결제는 5% 할인, 할인된 금액에서 한 번 더 할인이 가능 | ||
| - [x] 주문 혹은 결제가 불가능한 경우 그 이유를 보여 주고, 다시 주문 혹은 결제가 가능하도록 한다 | ||
| - [x] 최종 결제 금액을 보여준다 | ||
|
|
||
| ## 3. 프로그램 종료 | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| org.gradle.jvmargs=-Dfile.encoding=UTF-8 | ||
| org.gradle.console=plain |
Binary file not shown.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists |
Oops, something went wrong.
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.
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.
개인적 궁금증인데,
저는 뭔가 프로그램을 설계할 때의 기능 목록과
사람이 생각하는 기능에 대한 목록이 다른 것 같거든요
예를 들어서, 다리건너기 게임에서
게임이 종료할 때 총 시도 횟수 출력이라는 역할은 플레이어의 입장에서의 순서인 것 같고구현하기 위해서는
시도 횟수 1로 초기화,시도 회수 +1같은 과정들을 commit하는게 더 편하더라구요준보님 기능목록을 보면 테이블에 금액에 대한 내용이 들어있지 않아서
아마도 나중에 테이블 세팅을 완료하고 2번 결제에 들어간 후에 금액을 찾아오는 방식인지,
아니면 기능 목록은 플레이어 입장에서 적어놓지만 그때그때 잊지않고 세팅을 하는건지 궁금합니다!
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.
일단, 이번 기능 목록은 너무 대충 작성해 테이블 금액 관련된 내용을 적는 것을 깜박한거지만..ㅎㅎ
은기님 기능 목록처럼 플레이어 입장이 아닌, 구현하는 사람 입장에서 작성하는 것이 맞다고 생각합니다.
위 기능목록은 전체 흐름을 파악하는 용으로만 사용했고, 계속 프로그램 실행 예시를 보면서 필요한 것을 추가해 나가는 식으로 개발했었습니다:)
이것도 저 스스로 고쳐야할 부분이네요... 기능 목록과 실제 구현의 괴리를 좁히는 것이 살아 있는 문서를 만드는 방법이니까요~