forked from woowacourse-precourse/java-lotto-6
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathApplication.java
More file actions
28 lines (22 loc) · 978 Bytes
/
Application.java
File metadata and controls
28 lines (22 loc) · 978 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
package lotto.Controller;
import lotto.Model.Lotto;
import lotto.Model.LottoNumGenerater;
import lotto.Model.LottoResultChecker;
import lotto.View.LottoInput;
import lotto.View.LottoResultPrinter;
import java.util.List;
public class Application {
public static void main(String[] args) {
LottoInput input = new LottoInput();
LottoNumGenerater lottoGenerate = new LottoNumGenerater();
LottoResultChecker lottoResultCheck = new LottoResultChecker();
LottoResultPrinter lottoResultPrint = new LottoResultPrinter();
int lottoPrice = input.getLottoPrice();
int lottoNum = lottoPrice / 1000;
List<Lotto> lottos = lottoGenerate.generateLottos(lottoNum);
List<Integer> correctNum = input.getCorrectNum();
int bonusNum = input.getBonusNum();
int[] prizeCounts = lottoResultCheck.checkCorrectNum(lottos, correctNum, bonusNum);
lottoResultPrint.printResult(prizeCounts, lottoPrice);
}
}