Skip to content

Commit

Permalink
Merge pull request #1 from wilinetan/branch-A-CodingStandard
Browse files Browse the repository at this point in the history
Edit indentation for switch statement
  • Loading branch information
wilinetan committed Aug 26, 2020
2 parents d019552 + a7d3e62 commit f0e2756
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions src/main/java/Storage.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,33 @@ public ArrayList<Task> load() throws DukeException {
String taskType = data[0];

switch (taskType) {
case "T":
Todo todo = new Todo(data[2]);
case "T":
Todo todo = new Todo(data[2]);

if (data[1].equals("1")) {
todo.markAsDone();
}
if (data[1].equals("1")) {
todo.markAsDone();
}

tasks.add(todo);
break;
case "D":
Deadline deadline = new Deadline(data[2], data[3]);
tasks.add(todo);
break;
case "D":
Deadline deadline = new Deadline(data[2], data[3]);

if (data[1].equals("1")) {
deadline.markAsDone();
}
if (data[1].equals("1")) {
deadline.markAsDone();
}

tasks.add(deadline);
break;
case "E":
Event event = new Event(data[2], data[3]);
tasks.add(deadline);
break;
case "E":
Event event = new Event(data[2], data[3]);

if (data[1].equals("1")) {
event.markAsDone();
}
if (data[1].equals("1")) {
event.markAsDone();
}

tasks.add(event);
break;
tasks.add(event);
break;
}
}
return tasks;
Expand Down

0 comments on commit f0e2756

Please sign in to comment.