MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / choose

Method choose

Programs/ToDoList.java:23–34  ·  view source on GitHub ↗
(int desiredFunction, ArrayList<String> tasks, Scanner sc)

Source from the content-addressed store, hash-verified

21 }
22
23 public static void choose(int desiredFunction, ArrayList<String> tasks, Scanner sc) {
24 if (desiredFunction == 1) {
25 viewTask(tasks);
26 } else if (desiredFunction == 2) {
27 addTask(tasks);
28 } else if (desiredFunction == 3) {
29 deleteTasks(tasks);
30 } else {
31 System.out.println("Please choose in the range of 1 till 3 only!");
32 list(tasks);
33 }
34 }
35
36 static void addTask(ArrayList<String> tasks) {
37 Scanner sc = new Scanner(System.in);

Callers 1

listMethod · 0.95

Calls 4

viewTaskMethod · 0.95
addTaskMethod · 0.95
deleteTasksMethod · 0.95
listMethod · 0.95

Tested by

no test coverage detected