-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathLottoApplication.java
More file actions
34 lines (26 loc) Β· 909 Bytes
/
LottoApplication.java
File metadata and controls
34 lines (26 loc) Β· 909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import domain.lotto.Lotto;
import domain.lotto.LottoCollection;
import domain.lotto.LottoNumber;
import domain.lotto.WinningLotto;
import domain.money.Money;
import domain.provider.LottoSeller;
import input.InputView;
import output.OutputView;
import domain.LottoStatistics;
import java.util.Scanner;
/**
* @author delf
*/
public class LottoApplication {
public static void main(String[] args) {
final Money lottoPrice = Money.of(1000);
LottoSeller lottoSeller = new LottoSeller(lottoPrice);
Money money = InputView.inputMoney();
int manualCount = InputView.getManualCount();
LottoCollection myLotto = lottoSeller.sellTo(money, manualCount);
OutputView.printLotto(myLotto);
WinningLotto winningLotto = InputView.inputWinningLottoNumber();
LottoStatistics lottoStatistics = new LottoStatistics(winningLotto, myLotto, money);
OutputView.showWinningStatistics(lottoStatistics);
}
}