-
Notifications
You must be signed in to change notification settings - Fork 429
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
Add greater functionaility to the app #436
base: master
Are you sure you want to change the base?
Conversation
A "mark and unmark" feature would help users keep track of tasks better. Creating a Task class helps to better abstract the project and assists in the creation of such a feature as mentioned above. Let's create a Task class with the functionality required to implement task completion tracking.
Unique categories of tasks would allow the users to customise their lists and allow for greater freedom. Let's add different categories of Tasks, namely Todos, Events and Deadlines for the user to segregate their workflow.
Let's make the UI testing more robust by testing for more commands.
The user may provide incorrect input which the program may be unable to process. Let's add error handling for these edge cases.
Users may need to to delete the tasks in the list to reduce clutter. Let's add a delete function.
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.
Overall looks pretty good! I added some suggestions to make the code slightly more readable. Also, perhaps consider splitting some of the logic in Tyler.java
into other smaller classes (like a TaskList
class).
src/main/java/main/Tyler.java
Outdated
|
||
Scanner sc = new Scanner(System.in); | ||
ArrayList<Task> tasks = new ArrayList<>(); | ||
int i = 0; |
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 variable seems a little out of place. Perhaps a more informative variable name would be good here.
src/main/java/main/Tyler.java
Outdated
System.out.print(separator + greeting | ||
+ separator); |
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.
Perhaps this can be condensed into a single line? It does not seem very long.
src/main/java/task/Task.java
Outdated
/** | ||
* Adds task to array passed in as argument at specified index. | ||
* Returns the index of the next position to add a task. | ||
* | ||
* @param tasks Array to which task must be added. | ||
* @param index Position of task to be added. | ||
* @param task Task to be added. | ||
* @return Next task addition index. | ||
* @throws IllegalArgumentException If task description is blank. | ||
*/ |
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.
Nice javaDocs here, very informative!
@@ -0,0 +1,21 @@ | |||
package task; | |||
|
|||
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.
Perhaps it would be good to have header comments for each class as well? To give the reader a quick introduction to what the class is about.
The user may want their tasklist to persist between sessions. Let's add a storage function to the bot.
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.
Looks good to me, naming of variables are quite compliant with code quality guidelines. There are a few short variables but it's pretty obvious what they mean. Good job!
Files.createFile(tylerPath); | ||
} | ||
|
||
List<String> stored = Files.readAllLines(tylerPath); |
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.
Could this be more specific on what is being stored?
The user would benefits from being able to enter dates in a computer-parsable format, as it would allow for increased tracking capabilities. Let's add date and time functionality to the bot, as well as a command that lists out tasks with dates matching with the date provided by the user.
Add many more features to the app, including adding and removing tasks freely and introducing different types of tasks.