Skip to content

Commit 2787bf8

Browse files
committed
Create delete function
1 parent 3fe2bb2 commit 2787bf8

File tree

3 files changed

+5
-85
lines changed

3 files changed

+5
-85
lines changed

src/main/java/burger/Burger.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
package burger;
22

3-
import java.io.IOException;
43
import java.util.Scanner;
54

65
import burger.list.List;
76

8-
import static burger.BurgerFileClass.*;
9-
107
public class Burger {
118
static final String CHATBOT_NAME = "Burger";
129
static final String HORIZONTAL_LINE = "---------------------------------";
1310

14-
public static void main(String[] args) throws IOException {
11+
public static void main(String[] args) {
1512
welcomeMessage();
16-
List myList = getSaveFile();
13+
List myList = new List();
1714
Scanner input = new Scanner(System.in);
1815
boolean isPolling = true;
1916
while (isPolling) {
@@ -34,7 +31,7 @@ public static void main(String[] args) throws IOException {
3431
}
3532
}
3633
}
37-
goodbye(myList);
34+
goodbye();
3835
}
3936

4037
private static void welcomeMessage() {
@@ -57,9 +54,7 @@ private static void printUnknownInputError() {
5754
printLine();
5855
}
5956

60-
public static void goodbye(List currList) throws IOException {
61-
System.out.print("Saving file");
62-
setSaveFile(PATHNAME, currList);
57+
public static void goodbye() {
6358
printLine();
6459
System.out.println("Bye. Hope to see you again soon!");
6560
printLine();

src/main/java/burger/BurgerFileClass.java

Lines changed: 0 additions & 67 deletions
This file was deleted.

src/main/java/burger/list/List.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public List() {
3232
*/
3333
public boolean isValidCommand(String[] textArray) {
3434
boolean isValid = true;
35-
int idx = 0;
35+
int idx;
3636
try {
3737
String command = textArray[COMMANDIDX];
3838
switch (command) {
@@ -66,14 +66,6 @@ public boolean isValidCommand(String[] textArray) {
6666
}
6767
}
6868

69-
public void addFromSaveFile(char tde, char mark, String task) {
70-
Task currTask = new Task(task, tde);
71-
if (mark == 'X') {
72-
currTask.markDone();
73-
}
74-
taskList.add(currTask);
75-
}
76-
7769
private static int getIdx(String[] textArray) {
7870
StringBuilder idx = new StringBuilder();
7971
for (int i = 1; i < textArray.length; i++) {

0 commit comments

Comments
 (0)