Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/java/command/Parser.java
#	src/main/java/command/Storage.java
  • Loading branch information
leowyh committed Sep 16, 2019
2 parents 4f66bc5 + 095ce0a commit eeccd89
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 4 deletions.
Binary file modified data/duke.txt
Binary file not shown.
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Thu Sep 12 23:08:24 CST 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
6 changes: 6 additions & 0 deletions src/main/java/Duke.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import command.Parser;
import command.Storage;
import common.TaskList;
import task.Task;
import ui.Ui;

import java.util.ArrayList;

/**
Expand Down
14 changes: 12 additions & 2 deletions src/main/java/Parser.java → src/main/java/command/Parser.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
package command;

import common.DukeException;
import common.TaskList;
import task.Deadline;
import task.Event;
import task.Task;
import task.Todo;
import ui.Ui;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
Expand All @@ -23,7 +33,7 @@ public static boolean parse(String input, TaskList tasklist, Ui ui, Storage stor
if (isBye(input)) {
//print bye message
ui.byeMessage();
ui.in.close();
ui.getIn().close();
return true;

} else if (isList(input)) {
Expand Down Expand Up @@ -76,7 +86,7 @@ private static void processFind(String input, TaskList tasklist, Ui ui) {
TaskList findlist = new TaskList();
String[] splitspace = input.split(" ", 2);
for (Task tasks : tasklist.returnArrayList()) {
if (tasks.description.contains(splitspace[1])) {
if (tasks.getDescription().contains(splitspace[1])) {
findlist.addTask(tasks);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
package command;

import java.io.ObjectOutputStream;
import java.io.FileOutputStream;
import java.io.EOFException;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

import task.Task;
import java.util.ArrayList;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package common;

/**
* A class for exceptions specific to Duke.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
package common;

import task.Task;

import java.util.ArrayList;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package task;

import java.io.Serializable;

/**
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/Event.java → src/main/java/task/Event.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package task;

import java.io.Serializable;

/**
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/Task.java → src/main/java/task/Task.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package task;

import java.io.Serializable;

/**
Expand Down Expand Up @@ -38,4 +40,7 @@ public String getStatusIcon() {
public void setDone() {
this.isDone = true;
}
public String getDescription() {
return this.description;
}
}
2 changes: 2 additions & 0 deletions src/main/java/Todo.java → src/main/java/task/Todo.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package task;

import java.io.Serializable;

/**
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/Ui.java → src/main/java/ui/Ui.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
package ui;

import common.TaskList;
import task.Task;

import java.util.Scanner;

/**
Expand Down Expand Up @@ -108,4 +113,7 @@ public void exceptionMessage(String message) {
System.out.println(message);
System.out.print(line);
}
public Scanner getIn(){
return this.in;
}
}

0 comments on commit eeccd89

Please sign in to comment.