[audipras] iP - #629
Conversation
In build.gradle, the dependencies on distZip and/or distTar causes
the shadowJar task to generate a second JAR file for which the
mainClass.set("seedu.duke.Duke") does not take effect.
Hence, this additional JAR file cannot be run.
For this product, there is no need to generate a second JAR file
to begin with.
Let's remove this dependency from the build.gradle to prevent the
shadowJar task from generating the extra JAR file.
This reverts commit 66ca9d2.
dominic2412
left a comment
There was a problem hiding this comment.
In summary, your code largely follows good naming conventions, which significantly contributes to its readability and maintainability. The main areas for improvement are in using more descriptive class names and avoiding abbreviations like descrip. These changes will make your code even more intuitive and easier for others to understand.
Keep up the good work! :))
| @@ -0,0 +1,80 @@ | |||
| import task.TaskList; | |||
There was a problem hiding this comment.
Parser is a good name for a class responsible for parsing input. It clearly describes its purpose. Well done here!
| private void run() { | ||
| printGreeting(); | ||
| TaskManager taskManager = new TaskManager(); | ||
| TaskList taskList = initialiseBot(taskManager); |
There was a problem hiding this comment.
accurately describes the action it performs, which is good practice.
| } | ||
|
|
||
| public void deleteTask(int taskNumber) { | ||
| Task tempTask = taskList[taskNumber]; |
There was a problem hiding this comment.
tempTask is used to refer to a task temporarily during deletion or other operations, very well used!
| } | ||
| } | ||
|
|
||
| public void addTask(String input) { |
There was a problem hiding this comment.
The variable input is well-named as it clearly indicates that it holds user input. It is appropriately concise and descriptive.
| public void addTask(String input) { | ||
| Task task = new TodoTask(""); | ||
| if(input.startsWith("todo ")) { | ||
| String descrip = input.substring(5).trim(); |
There was a problem hiding this comment.
The abbreviation descrip is a bit unclear at first glance. It would be better to use the full word description for clarity.
adipanda2002
left a comment
There was a problem hiding this comment.
Overall, LGTM. Your OOP principles are generally well followed in your code. I feel the readability of your code could be enhanced by adding in Javadoc comments, and also perhaps using enums. Some other nits to fix here and there.
| import task.TaskList; | ||
| import task.TaskManager; | ||
|
|
||
| public class Maga { |
There was a problem hiding this comment.
I like your use of OOP concepts to make your main class clean and easy to read
| continue; | ||
| } | ||
|
|
||
| // mark tasks as done |
There was a problem hiding this comment.
comments to explain each command follow coding style well and helpful in understanding the code
| } | ||
|
|
||
| public void handleInput(String input) { | ||
| while(!input.equalsIgnoreCase("bye")) { |
There was a problem hiding this comment.
You could consider the use of enums instead of representing Tasks as Strings.
| private TaskList initialiseBot(TaskManager taskManager) { | ||
| return taskManager.loadTasks(); | ||
| } | ||
|
|
There was a problem hiding this comment.
I think you are missing Javadoc commands across your codebase? I understand it is time consuming, but perhaps writing javadocs for at least the key methods will enable future readers of your code to understand it more seamlessly.
| String to = parts[4]; | ||
| return new DeadlineTask(isDone, description, from, to); | ||
| } | ||
|
|
There was a problem hiding this comment.
Did you mean to have 'from' and 'to' parameters for Deadline and 'dateTime' for Event? Logically speaking, they should be the other way around don't you think?
| public TaskList loadTasks() { | ||
| TaskList tasks = new TaskList(100); | ||
| File file = new File(FILE_PATH); | ||
|
|
There was a problem hiding this comment.
I like that you are sticking to the style when it comes to indenting comments relative to their position in the code
Add Command, Controller and InvalidCommandException classes Add Junit Tests for delete, mark and unmark functions
Using the exit command now properly closes javafx window after a pause. Bot now properly saves tasks to the task file after every change to the task list.
Create packages 'ui', 'middleware', 'commands' and 'exceptions' to further organise code.
Add new exception
Add assertions
Tagging tasks is unavailable. User can't categorise tasks since description can't be changed. Add new 'tag' string field to each task, and add new 'tag' command so users can tag current tasks.
No help manual for the user. Create user guide to orient the user on how to use the bot. The user can immediately use the bot without facing errors with bot usage.
MAGA Chatbot
The release of this chatbot is yuuuuuge - like, YUUUGE. It's gonna solve ALL your task-related problems. Just trust me - its the best 👌. It has:
TRUMPDRUMPF SPEECHFeatures:
People who endorse this app:
I support all jobs and occupations in America - yes, even our dear musicians and artists. Look at the beautiful art this bot has:
Download this bot nowww 👌 - Make America Great Again!!