-
Notifications
You must be signed in to change notification settings - Fork 738
Expand file tree
/
Copy pathLadderMain.java
More file actions
26 lines (22 loc) · 1.04 KB
/
LadderMain.java
File metadata and controls
26 lines (22 loc) · 1.04 KB
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
package nextstep.ladder;
import nextstep.ladder.domain.Height;
import nextstep.ladder.domain.Ladder;
import nextstep.ladder.domain.LadderResult;
import nextstep.ladder.domain.LadderResultDeterminer;
import nextstep.ladder.domain.LadderResultManager;
import nextstep.ladder.domain.Names;
import nextstep.ladder.view.InputView;
import nextstep.ladder.view.OutputView;
public class LadderMain {
public static void main(String[] args){
InputView inputView = new InputView();
OutputView outputView = new OutputView();
final Names names = new Names(inputView.inputNames());
final LadderResult ladderResult = new LadderResult(inputView.inputResult());
final Ladder ladder = new Ladder(names.getNumberOfNames(), inputView.inputLadderHeight());
outputView.printLadder(names, ladder);
final LadderResultDeterminer determiner = new LadderResultDeterminer(ladderResult, names);
final LadderResultManager ladderResultManager = new LadderResultManager(names, ladder, determiner);
outputView.printResult(inputView.inputName(), ladderResultManager);
}
}