-
Notifications
You must be signed in to change notification settings - Fork 437
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
[Jeremy Tan] iP #326
[Jeremy Tan] iP #326
Conversation
# Conflicts: # src/main/java/Duke.java
# Conflicts: # src/main/java/Command.java
src/main/java/Command.java
Outdated
} | ||
} | ||
|
||
class FindCommand extends Command { |
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.
Shouldnt different classes be put into different files ?
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.
Agreed, for now the code is manageable as they are not too much, but if the project expands, it may become hard to navigate.
src/main/java/Ui.java
Outdated
* Formats given String and prints in the UI | ||
* @param printStr String to be formatted and printed | ||
*/ | ||
public void printf(String printStr) { |
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 think this function name should be more expressive
Great job with the current iP progress! The code is neat and most classes have specific methods with 1 clear purpose. However there are several points that could be improved. The testing seems to be a bit sparse, you might want to add more tests as you have quite a number of methods for each class. |
src/main/java/Command.java
Outdated
class DeleteCommand extends Command { | ||
private int deleteTask; | ||
|
||
DeleteCommand(int 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.
Can consider renaming the task parameter as taskIndex to make it clearer for users
src/main/java/Command.java
Outdated
* A delete command to delete a given task number | ||
*/ | ||
class DeleteCommand extends Command { | ||
private int deleteTask; |
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 be named better, maybe taskIndexDelete, etc..
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 really great! I love that your code is very neat and easy to understand. Just some nit picks actually. :D
src/main/java/Command.java
Outdated
class TodoCommand extends Command { | ||
private String task; | ||
|
||
TodoCommand(String toParse) { |
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 agree that it will be better to split the various classes into different files
src/main/java/DialogBox.java
Outdated
public static DialogBox getUserDialog(String text, Image img) { | ||
return new DialogBox(text, img); | ||
} | ||
|
||
public static DialogBox getDukeDialog(String text, Image img) { | ||
var db = new DialogBox(text, img); | ||
db.flip(); | ||
return db; |
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.
Not sure if Javadocs is needed since the code is provided.
src/main/java/Duke.java
Outdated
/** | ||
* You should have your own function to generate a response to user input. | ||
* Replace this stub with your completed method. | ||
*/ |
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.
Is this a placeholder for now?
return Arrays.asList(rtnSplit).stream().collect(Collectors.joining("\n")); | ||
} | ||
|
||
public String find(String key) { |
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.
Might be better if function is renamed to finding a specific thing instead of just find.
String[] split = line.split("%d%"); | ||
if (split.length > 3) { | ||
taskList.add(Task.createTask(split[0], split[1], split[2], split[3])); | ||
} else { |
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 add an additional else statement to capture everything else. For easier debugging.
Check for code quality violations and standardized formatting throughout. Refactor Commands into separate class files
Use Assertions: Add assertion for storage file type
Improve Code Quality
Add prompt to load data file using command "load"
Add prompt to select data file when "load" command given
New profile pictures Minimal GUI
This reverts commit cfa9af5.
Valid input dates via regex. Restrict file loading to .txt files only. Add Javadoc for more classes and methods.
No description provided.