-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUi.java
More file actions
47 lines (35 loc) · 953 Bytes
/
Copy pathUi.java
File metadata and controls
47 lines (35 loc) · 953 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
35
36
37
38
39
40
41
42
43
44
45
46
package linqing.tojava;
import java.util.Scanner;
/**
* Ui class that will be responsible for interacting with the user.
*/
public class Ui {
public Scanner in = new Scanner(System.in);
public Ui() {
}
public String getInput() {
return in.nextLine();
}
public String readUserCommand() {
System.out.println("Your task?");
return getInput();
}
public void showToUser(String s) {
System.out.println(s);
}
public void printWelcome() {
System.out.println("Welcome to TaskManager");
}
public void showExit() {
System.out.println("Bye!");
}
public void printError() {
System.out.println("Unknown command! please try again");
}
public void printError(String ErrorMsg) {
System.out.println(ErrorMsg);
}
public static void Error() {
System.out.println("Disappear isDone element for CREATE TASK");
}
}