Skip to content

Commit

Permalink
reorder loadCommandHandlers
Browse files Browse the repository at this point in the history
  • Loading branch information
Märt Bakhoff committed Apr 14, 2018
1 parent d644023 commit 631c5d0
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/main/java/app/AccountManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ public AccountManager(Connection connection) {
this.commandHandlers = loadCommandHandlers();
}

private List<CommandHandler> loadCommandHandlers() {
return Arrays.asList(
new Signup(),
new Display(),
new Deposit(),
new Withdraw(),
new Transfer()
);
}

public void runInteractive() throws Exception {
try (Scanner console = new Scanner(System.in)) {
while (true) {
Expand All @@ -34,14 +44,4 @@ public void runInteractive() throws Exception {
}
}
}

private List<CommandHandler> loadCommandHandlers() {
return Arrays.asList(
new Signup(),
new Display(),
new Deposit(),
new Withdraw(),
new Transfer()
);
}
}

0 comments on commit 631c5d0

Please sign in to comment.