forked from nus-cs2113-AY2021S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request nus-cs2113-AY2021S1#30 from manuelmanuntag96/manue…
…l-Feature1 Manuel feature1
- Loading branch information
Showing
14 changed files
with
191 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
package seedu.duke.command; | ||
//package seedu.duke.command; | ||
|
||
import seedu.duke.exception.DukeException; | ||
//import seedu.duke.exception.DukeException; | ||
//import seedu.duke.storage.Storage; | ||
import seedu.duke.task.Task; | ||
import seedu.duke.task.TaskList; | ||
import seedu.duke.ui.Ui; | ||
//import seedu.duke.task.Task; | ||
//import seedu.duke.task.TaskList; | ||
//import seedu.duke.ui.Ui; | ||
|
||
/** | ||
* Deletes a task from the task list. | ||
*/ | ||
public class DeleteCommand extends Command { | ||
//public class DeleteCommand extends Command { | ||
|
||
public DeleteCommand(String information) { | ||
super(information); | ||
} | ||
//public DeleteCommand(String information) { | ||
//super(information); | ||
//} | ||
|
||
@Override | ||
public void execute(TaskList tasks, Ui ui/*, Storage storage*/) throws DukeException { | ||
int index = Integer.parseInt(input); | ||
Task removedTask = tasks.getTask(index); | ||
tasks.deleteTask(index); | ||
ui.printDelete(tasks, removedTask); | ||
//@Override | ||
//public void execute(TaskList tasks, Ui ui/*, Storage storage*/) throws DukeException { | ||
//int index = Integer.parseInt(input); | ||
//Task removedTask = tasks.getTask(index); | ||
//tasks.deleteTask(index); | ||
//ui.printDelete(tasks, removedTask); | ||
//storage.write(tasks); | ||
} | ||
} | ||
//} | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
package seedu.duke.command; | ||
//package seedu.duke.command; | ||
|
||
//import seedu.duke.storage.Storage; | ||
import seedu.duke.task.Task; | ||
import seedu.duke.task.TaskList; | ||
import seedu.duke.ui.Ui; | ||
//import seedu.duke.task.Task; | ||
//import seedu.duke.task.TaskList; | ||
//import seedu.duke.ui.Ui; | ||
|
||
/** | ||
* Finds task(s) in task list that matches the keyword. | ||
*/ | ||
public class FindCommand extends Command { | ||
//public class FindCommand extends Command { | ||
|
||
public FindCommand(String keyword) { | ||
super(keyword); | ||
} | ||
//public FindCommand(String keyword) { | ||
//super(keyword); | ||
//} | ||
|
||
@Override | ||
public void execute(TaskList tasks, Ui ui/*, Storage storage*/) { | ||
TaskList tasksFound = new TaskList(); | ||
for (Task t : tasks.getTaskList()) { | ||
if (t.getDescription().contains(input)) { | ||
tasksFound.addTask(t); | ||
} | ||
} | ||
ui.printFind(tasksFound, input); | ||
} | ||
} | ||
//@Override | ||
//public void execute(TaskList tasks, Ui ui/*, Storage storage*/) { | ||
//TaskList tasksFound = new TaskList(); | ||
//for (Task t : tasks.getTaskList()) { | ||
//if (t.getDescription().contains(input)) { | ||
//tasksFound.addTask(t); | ||
//} | ||
//} | ||
//ui.printFind(tasksFound, input); | ||
//} | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
package seedu.duke.command; | ||
//package seedu.duke.command; | ||
|
||
//import seedu.duke.storage.Storage; | ||
import seedu.duke.task.TaskList; | ||
import seedu.duke.ui.Ui; | ||
//import seedu.duke.task.TaskList; | ||
//import seedu.duke.ui.Ui; | ||
|
||
/** | ||
* Prints a list of all tasks to the user. | ||
*/ | ||
public class ListCommand extends Command { | ||
//public class ListCommand extends Command { | ||
|
||
public ListCommand() { | ||
super(null); | ||
} | ||
//public ListCommand() { | ||
//super(null); | ||
//} | ||
|
||
@Override | ||
public void execute(TaskList tasks, Ui ui/*, Storage storage*/) { | ||
ui.printList(tasks); | ||
} | ||
} | ||
//@Override | ||
//public void execute(TaskList tasks, Ui ui/*, Storage storage*/) { | ||
//ui.printList(tasks); | ||
//} | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package seedu.duke.command; | ||
|
||
import seedu.duke.exception.DukeException; | ||
//import seedu.duke.storage.Storage; | ||
//import seedu.duke.task.Event; | ||
//import seedu.duke.task.TaskList; | ||
import seedu.duke.ui.Ui; | ||
import seedu.duke.user.User; | ||
import seedu.duke.user.UserList; | ||
|
||
/** | ||
* Adds an event to the task list. | ||
*/ | ||
public class LogInCommand extends Command { | ||
|
||
public LogInCommand(String input) { | ||
super(input); | ||
} | ||
|
||
@Override | ||
public void execute(UserList users, Ui ui/*, Storage storage*/) throws DukeException { | ||
String[] parsedInputs = input.split(" /", 2); | ||
User newUser = new User(parsedInputs[0], parsedInputs[1]); | ||
currentUser = newUser; | ||
users.addUser(newUser); | ||
ui.greetUser(newUser); | ||
//storage.write(tasks); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/s/d/Timetable/Timetable.java → .../java/seedu/duke/timetable/Timetable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package s.d.timetable; | ||
package seedu.duke.timetable; | ||
|
||
import java.util.ArrayList; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.