-
Notifications
You must be signed in to change notification settings - Fork 364
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
[RyanQiu1] iP #75
base: master
Are you sure you want to change the base?
[RyanQiu1] iP #75
Conversation
…he user, first is to handle the unknown command error and next is to handle the empty field error
…changes. Load the data from the hard disk when Duke starts up.
…tests to the classes
# Conflicts: # src/main/java/duke/parser/Parser.java # src/main/java/duke/task/Task.java # src/main/java/duke/task/TaskList.java
# Conflicts: # src/main/java/duke/parser/Parser.java
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!
Most of your code follows the coding standards, just that some minor tweaks are needed for your boolean methods, switch-case indentation and if-else blocks.
this.listNum = taskNumberMark; | ||
} | ||
|
||
public boolean execute(TaskList tasks, Ui ui, StorageList storage) { |
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 boolean method can be made to sound like a boolean (eg. canExecute)?
this.to = checkerTo[1]; | ||
} | ||
|
||
public boolean execute(TaskList tasks, Ui ui, StorageList storage) { |
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.
I noticed your naming convention for boolean methods in several other places too. Might be good to make them sound more like a boolean.
String[] input2 = input.split(" "); | ||
Type t = Type.valueOf(input2[0].toLowerCase()); | ||
switch (t) { | ||
case todo: |
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.
Should the indentation of your switch-case statement be the same?
public void updateStorage() { | ||
try { | ||
File dir = new File("data"); | ||
if (!dir.exists()) dir.mkdirs(); |
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.
Shouldn't your conditionals be placed on a different line, and be wrapped in curly braces?
src/main/java/duke/task/Task.java
Outdated
|
||
public String toString() { | ||
if (typeofTask.equals("")) | ||
return "[" + this.getStatusIcon() + "]" + " " + this.description; |
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.
Same issue as with StorageList.java, shouldn't the if-block be wrapped in curly braces?
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.
Yes u are right, i have rectified it.
public ArrayList<Task> find(String message) { | ||
ArrayList<Task> arrStr = new ArrayList<>(); | ||
for (Task t: list) { | ||
if (t.toString().contains(message)) { |
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 job adding curly braces here! 👍
# Conflicts: # build.gradle # src/main/java/duke/Duke.java # src/main/java/duke/command/ByeCommand.java # src/main/java/duke/command/DeadlineCommand.java # src/main/java/duke/command/DeleteCommand.java # src/main/java/duke/command/EventCommand.java # src/main/java/duke/command/FindCommand.java # src/main/java/duke/command/ListCommand.java # src/main/java/duke/command/MarkCommand.java # src/main/java/duke/command/TodoCommand.java # src/main/java/duke/command/UnmarkCommand.java # src/main/java/duke/task/TaskList.java
There is a addition of a title and appears more aesthetically pleasing. Adding the images and improving the UI, with setTitle() and getIcons().add(). To enable the user to see the application they are accessing and the icon of the software.
Added assertions and fixed the removed unused UI
Improve code quality by changing names, changing oop structure.
…-CodeQuality # Conflicts: # data/duke.txt # src/main/java/duke/command/DeadlineCommand.java # src/main/java/duke/command/FindCommand.java # src/main/java/duke/command/MarkCommand.java # src/main/java/duke/command/TodoCommand.java # src/main/java/duke/command/UnmarkCommand.java
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, I think your code is really structured and follows the coding standard very well.
private String timing; | ||
|
||
public DeadlineCommand(String fullCommand) { | ||
String[] checker = fullCommand.split("/by "); |
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.
May I know why this is called checker
???
* Delete Command to remove the tasks users do not want, according to its number on the list. | ||
*/ | ||
public class DeleteCommand extends Command { | ||
private int listNum; |
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.
Can I clarify what listNum
is used for? Would it be better to call it index
or something?
public EventCommand(String input) { | ||
String[] checkerSlash = input.split("/"); | ||
String[] checkerEvent = checkerSlash[0].split("event "); | ||
String[] checkerFrom = checkerSlash[1].split("from "); |
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.
Would it be better if we rename it to fromChecker
or something related?
Duke Bot
Duke bot is:
SlowFast!Here are the steps involved!
Most importantly Free Software
Features in this software
If you Java programmer, you can use it to practice Java too. Here's the main method: