Skip to content

Commit

Permalink
Completed A-Packages: Java Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
lijiayu980606 committed Sep 12, 2019
1 parent 32bc9dd commit e530fa0
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 @@ -77,7 +87,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,3 +1,7 @@
package command;

import task.Task;

import java.io.*;
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 e530fa0

Please sign in to comment.