-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFinalToDo.java
More file actions
44 lines (35 loc) · 1.32 KB
/
FinalToDo.java
File metadata and controls
44 lines (35 loc) · 1.32 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import java.util.*;
public class FinalToDo {
public static void main( String[] args ) {
Scanner sc = new Scanner (System.in);
String[] toDo = new String[10];
int taskCount = 0;
char again = 'y';
while (again == 'y') {
System.out.println("[A]dd task to list, [D]elete task, [E]dit task, [S]how list, [Q]uit?");
String choice = sc.next(); // Human choice
//Add block
if (choice.equalsIgnoreCase("A")) {
System.out.println("Make another change? [Q]uit to end.");
for(int i=0; i<10; i++)
toDo[i] = choice.next();
taskCount++;
}
//Delete block
else if (choice.equalsIgnoreCase("D")) {
System.out.println("Make another change? [Q]uit to end.");
taskCount--;
}
//Edit block
else if (choice.equalsIgnoreCase("E")) {
System.out.println("Make another change? [Q]uit to end.");
}
//Show block
else if (choice.equalsIgnoreCase("S")) {
}
System.out.println("Make another change? [Q]uit to end.");
again = sc.next().charAt(0);
}
// end main code block
}
}