-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Zhu Le Yao] iP #414
base: master
Are you sure you want to change the base?
[Zhu Le Yao] iP #414
Conversation
This reverts commit 2a7c671.
Tasks can be marked as done or undone. Wordings are modified. Task class is added to store name, number and task information.
Subclasses of Tasks are created, namely Todo, Deadline and Event. Deadline and Event are able to store information on the task's time. Some wording are also modified.
Exceptions are missing index, invalid index, invalid command and incomplete command caused by missing task or task time.
Time format is shown as "MMM dd yyyy HHmm a".
src/main/java/Deadline.java
Outdated
} | ||
|
||
@Override | ||
public void markAsDone() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good splitting of lines!
src/main/java/Duke.java
Outdated
|
||
try { | ||
if (command.equals("list")) { | ||
this.printCommandList(allTasks); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary qualifier to this
src/main/java/Task.java
Outdated
this.taskNumber = taskNumber; | ||
this.taskStatus = taskStatus; | ||
this.task = task; | ||
this.totalNumOfTasks = totalNumOfTasks; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this field is unused
src/main/java/Task.java
Outdated
@@ -0,0 +1,66 @@ | |||
public class Task { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be made into a abstract class, with abstract method implementations
src/main/java/Deadline.java
Outdated
@@ -0,0 +1,58 @@ | |||
public class Deadline extends Task { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs Javadocs for these public classes & public methods
Existing ask list is able to be reflected in duke when restarted.
dedfbd6
to
2008de1
Compare
# Conflicts: # src/main/java/Deadline.java # src/main/java/Duke.java # src/main/java/Event.java # src/main/java/Task.java
# Conflicts: # src/main/java/Deadline.java # src/main/java/Duke.java # src/main/java/Event.java # src/main/java/Task.java
Ui: deals with interactions with the user Storage: deals with loading tasks from the file and saving tasks in the file Parser: deals with making sense of the user command TaskList: contains the task list e.g. it has operations to add/delete tasks in the list
# Conflicts: # src/main/java/duke/exception/DukeException.java # src/main/java/duke/task/Deadline.java # src/main/java/duke/task/Event.java # src/main/java/duke/task/Task.java
# Conflicts: # src/main/java/duke/main/Ui.java
In Parser.java, "mark", "unmark" and "delete" commands has similar parsing codes. Similar areas are taken out to form method checkExceptionAndGetTask(String, TaskList). In Storage.java, "mark" and "unmark" commands has similar file reading procedures. Similar areas are taken out to form method markOrUnmarkStorage(File, String, Task, DateTimeFormatter, TaskList, String). "delete" command's file reading procedure is taken out to form method deleteStorage(File, String, TaskList).
Add Assertions for assumptions in main
Improve code quality
A way to archive every task and action is added. Tasks archived will be saved in archive.txt in the folder "data". Deleted tasks will be removed from tasks.txt but remains stored in archive.txt. User can use command "archive" to archive a copy of the current tasks in list. This will be saved in archiveAll.txt in folder "data". archive.txt will still contain history of all tasks, not just tasks in current list.
* branch-BCD-Extension: Add a way to archive items A way to archive every task and action is added. Tasks archived will be saved in archive.txt in the folder "data". Deleted tasks will be removed from tasks.txt but remains stored in archive.txt. User can use command "archive" to archive a copy of the current tasks in list. This will be saved in archiveAll.txt in folder "data". archive.txt will still contain history of all tasks, not just tasks in current list.
DukePro
DukePro helps you to record your tasks and events.
DukePro is:
How to use DukePro:
Features:
If you would like to practice yourself, here is the
main
method: