generated from Learning-Is-Vital-In-Development/study-template
-
Notifications
You must be signed in to change notification settings - Fork 6
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
전략 패턴 vs 커맨트 패턴 차이 #35
Labels
Comments
public class Bicycle implements Transportation {
@Override
public void move(String start, String end){
System.out.println("출발점 : " + start + "에서 목적지 : " + end + "까지 `자전거`로 이동합니다.");
}
}
public class InstantScratch implements LotteryCommand {
private InstantLottery instantLottery;
private account Account;
public InstantScratch(InstantLottery instantLottery, Account account) {
this.instantLottery = instantLottery;
this.account = Account;
}
@Override
public void scratch() {
//instantLottery의 당첨을 확인하고 account에 돈을 집어 넣는 로직
}
} https://tecoble.techcourse.co.kr/post/2021-10-04-strategy-command-pattern/ |
세미님이 답변해주신 내용을 기반으로 정리해보았어요 ~
[커맨드 패턴]
[결론] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
전략 패턴과 커맨드 패턴이 비슷해 보이는데, 차이가 있을까요?
The text was updated successfully, but these errors were encountered: