Merged
Conversation
- 공연을 관람하는 초대 일자(when)가 있습니다
- 관람료(fee)가 있습니다. - 누구든 티켓의 관람료에 접근해요: getFee
- 초대장(Invitation), 티켓(Ticket), 현금(amount)이 있습니다. - 누구든 가방의 초대장을 확인해요: hasInvitation - 누구든 가방의 티켓을 확인해요: hasTicket - 누구든 가방의 티켓을 받아줘요: setTicket(ticket) - 누구든 가방의 현금을 전달해요: minusAmount(amount) - 누구든 가방의 현금을 받아줘요: plusAmount(amount)
- 가방은 초대장과 현금을 받아요: Bag(Invitation, amount) - 가방은 현금을 받아요: Bag(amount)
- 가방(Bag)이 있습니다. - 관람객은 가방을 받아요: Audience(Bag) - 누구든 가방에 접근해요: getBag
- 판매 및 교환을 위한 티켓들(tickets)과 판매 금액(amount)이 있습니다. - 티켓 판매소는 판매 금액과 티켓들을 받아요: TicketOffice(amount, tickets) - 누구든 티켓 판매를 해요: getTicket - 누구든 티켓 판매소의 판매 금액을 전달해요: minusAmount(amount) - 누구든 티켓 판매소의 판매 금액을 받아줘요: plusAmount(amount)
- 티켓 판매소(TicketOffice)가 있습니다. - 누구든 티켓 판매소에 접근해요: getTicketOffice
- 티켓 판매자(TicketSeller)가 있습니다. - 누구든 극장의 관람객을 입장시키세요: enter(Audience) - 구현: 티켓 판매자는 관람객에게 초대장이 있다면 티켓을 전달하고 없다면 티켓을 결제합니다. - 입력 과정에서 티켓(Ticket)에서 관람료(fee)가 없다는 것을 확인하고 추가했습니다.
- 티켓 판매자(TicketSeller)는 티켓 판매소(TicketOffice)에서 티켓 판매(getTicket)와 관람객(Audience) 가방(Bag)을 스스로 관리할 수 있도록 티켓 판매자를 통한 누구든 티켓 판매소 접근(getTicketOfiice)을 제거합니다. - 극장(Theater)을 통해 누구든 관람객을 입장시키세요(enter)의 구현을 티켓 판매자(TicketSeller)를 통해 누구든 관람객에게 판매하세요(sellTo)의 구현으로 이동시킵니다. - 누구든 관람객에게 판매하세요: sellTo(Audience) - 변경 후: 극장은 관람객을 입장시키기위해 티켓 판매자를 통해 판매만 지시하면 됩니다. - 테스트를 진행하며 일부 누락된 생성자를 추가했습니다.
- 관람객(Audience)은 티켓(Ticket)을 스스로 구매할 수 있도록 관람객을 통한 누구든 가방에 접근(getBag)을 제거합니다. - 티켓 판매자(TicketSeller)는 관람객에게 판매하세요(sellTo)의 구현을 관람객(Audience)은 티켓을 구매한 뒤 티켓비용을 가져오세요(buy)의 구현으로 이동시킵니다. - 티켓을 구매한 뒤 티켓비용을 가져오세요: buy(Ticket) - 변경 후: 티켓 판매자는 관람객에게 티켓 관람료를 가져오도록 지시하면 됩니다. 티켓 판매자는 가져온 티켓 관람료를 티켓 판매소에 전달합니다. - 테스트 파일명과 일부 내용을 수정했습니다.
- 가방(Bag)이 초대장(Invitation)의 여부에 따라 티켓(Ticket) 비용을 스스로 가져오도록 만듭니다. - 가방을 통해 누구든 티켓을 보유한 뒤 티켓비용을 가져오세요: hold(Ticket) - hold를 제외한 나머지 메서드의 접근을 가방에서만 접근하도록 만들어 응집도를 높입니다. - 테스트를 위해 금액이 부족할 경우 Exception 처리를 하나 추가했습니다.
- 티켓 판매자(TicketSeller)는 티켓 판매소를 통해 누구든 관람객에게 티켓을 판매하고, 티켓 판매소(TicketOffice)가 티켓 판매 금액을 스스로 받을 수 있게 만듭니다.(plusAmount) - 이 과정에서 티켓 판매소는 관람객에 의존하게 됩니다. - 누구든 티켓을 관객에게 판매합니다: sellTicketTo(Audience) - sellTicketTo를 제외한 나머지 메서드의 접근은 티켓 판매소에서만 접근하도록 만듭니다.
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.
Uh oh!
There was an error while loading. Please reload this page.