Skip to content

Commit

Permalink
Level-9
Browse files Browse the repository at this point in the history
  • Loading branch information
billieboy7 committed Sep 6, 2023
1 parent d8a83a6 commit 443b906
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 20 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test {
}

application {
mainClass.set("seedu.duke.Duke")
mainClass.set("duke.Duke")
}

shadowJar {
Expand Down
4 changes: 4 additions & 0 deletions data/data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
T | 0 | sujith
T | 0 | suji
T | 0 | bill sujith kumaar
T | 0 | bill
10 changes: 5 additions & 5 deletions src/main/java/Command/FindCommand.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package Command;
package command;

import Main.Storage;
import Main.UI;
import Task.Task;
import Task.TaskList;
import main.Storage;
import main.UI;
import task.Task;
import task.TaskList;

public class FindCommand extends Command {

Expand Down
11 changes: 7 additions & 4 deletions src/main/java/command/ByeCommand.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package command;

import exception.DukeException;
import task.TaskList;
import main.UI;
import main.Storage;

import exception.DukeException;

/**
* ByeCommand is a subclass of Command.
Expand All @@ -14,13 +14,15 @@ public class ByeCommand extends Command {
/**
* Constructor for ByeCommand
*/
public ByeCommand() {}
public ByeCommand() {
}

/**
* method to execute the bye sequence
*
* @param taskList object containing the ArrayList of tasks
* @param ui user interface responsible for terminal messages
* @param storage object to communicate with data.txt file
* @param ui user interface responsible for terminal messages
* @param storage object to communicate with data.txt file
* @throws DukeException organic exception for Duke
*/
@Override
Expand All @@ -31,6 +33,7 @@ public void execute(TaskList taskList, UI ui, Storage storage) throws DukeExcept

/**
* Method to decide whether program should continue
*
* @return false, signifying end of program
*/
@Override
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/main/Parser.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package main;

import Command.ByeCommand;
import Command.Command;
import Command.ListCommand;
import Command.MarkCommand;
import Command.UnmarkCommand;
import Command.ToDoCommand;
import Command.EventCommand;
import Command.DeadlineCommand;
import Command.DeleteCommand;
import Command.FindCommand;
import command.ByeCommand;
import command.Command;
import command.ListCommand;
import command.MarkCommand;
import command.UnmarkCommand;
import command.ToDoCommand;
import command.EventCommand;
import command.DeadlineCommand;
import command.DeleteCommand;
import command.FindCommand;

import exception.DukeException;

Expand Down
9 changes: 9 additions & 0 deletions src/main/java/task/Task.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ public String outputStoreFormat() {
return null;
}

/**
* getter function
* @return retrieves the saved description.
*/
public String getDescription() {
return this.description;
}

/**
* toString() method.
* @return string text of the task in which the task will be displayed in the terminal.
Expand All @@ -46,3 +54,4 @@ public String toString() {
return "[" + this.getStatusIcon() + "] " + this.description;
}
}

0 comments on commit 443b906

Please sign in to comment.