Skip to content

Chapter 02 를 공부하고 테스트 코드를 추가하라#2

Merged
johngrib merged 13 commits intomasterfrom
chapter-02
Mar 3, 2020
Merged

Chapter 02 를 공부하고 테스트 코드를 추가하라#2
johngrib merged 13 commits intomasterfrom
chapter-02

Conversation

@johngrib
Copy link
Copy Markdown
Owner

@johngrib johngrib commented Mar 3, 2020

image
image

johngrib added 13 commits March 1, 2020 23:08
* 할인 조건 인터페이스를 추가하였습니다.
    * 구현체인 순번 기준 할인 조건을 추가했습니다.
    * 구현체인 상영 기간 기준 할인 조건을 추가했습니다.
* 할인 정책을 표현하는 인터페이스를 추가했습니다.
    * 구현체인 일정 금액 할인 정책을 추가했습니다.
    * 구현체인 일정 비율 할인 정책을 추가했습니다.
`NoneDiscountPolicy` 는 0 원을 할인해주는 할인 정책입니다.
* `DiscountPolicy`를 `DefaultDiscountPolicy`로 개명했습니다.
    * `PercentDiscountPolicy`는 `DefaultDiscountPolicy`를 상속합니다.
    * `AmountDiscountPolicy`는 `DefaultDiscountPolicy`를 상속합니다.
* `DiscountPolicy` 인터페이스를 새로 추가했습니다.
    * `NoneDiscountPolicy`는 `DiscountPolicy`를 구현합니다.
* `Movie` 클래스에 `changeDiscountPolicy` 메소드를 추가했습니다.
* `calculateMovieFee` 메소드의 테스트 코드를 추가했습니다.
* `changeDiscountPolicy` 메소드의 테스트 코드를 추가했습니다.
@johngrib johngrib merged commit 3fbf01f into master Mar 3, 2020
@johngrib johngrib deleted the chapter-02 branch March 3, 2020 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant