-
Notifications
You must be signed in to change notification settings - Fork 191
Expand file tree
/
Copy pathDuke.java
More file actions
34 lines (28 loc) · 835 Bytes
/
Duke.java
File metadata and controls
34 lines (28 loc) · 835 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
package duke;
import duke.processes.Parser;
import duke.processes.Storage;
import duke.processes.TaskList;
import duke.processes.Ui;
import java.io.IOException;
import java.util.Scanner;
public class Duke {
public static void main(String[] args) throws IOException {
TaskList tasks = new TaskList();
Storage.loadTasks(tasks);
Ui.printWelcomeMessage();
activeChat(tasks);
Storage.saveTasks(tasks);
Ui.printGoodbyeMessage();
}
private static void activeChat(TaskList tasks) {
boolean isBye = false;
String input;
Scanner in = new Scanner(System.in);
while(!isBye){
//store input into String
input = in.nextLine();
//process input
isBye = Parser.processInput(tasks, input);
}
}
}