-
Notifications
You must be signed in to change notification settings - Fork 479
[Song Bingxi] iP #581
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
base: master
Are you sure you want to change the base?
[Song Bingxi] iP #581
Conversation
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 except for some parts
- everything should be written in English!
- some parts could be extracted out into Ui, Parser classes
- do consider adding a description for your PR!
src/main/java/Dan.java
Outdated
| public class Dan { | ||
|
|
||
| private final static String greets = "\nDan: \n"; | ||
| private static MyList tasks = new MyList(100); |
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 a class name like TaskList would be more intuitive than MyList?
src/main/java/Dan.java
Outdated
| System.out.println( | ||
| greets + | ||
| " 好啦,帮你擦掉了一条任务哦:\n " + removedTask + | ||
| "\n 现在还剩下" + tasks.size() + "项任务哦!\n" |
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.
only english is recommended for coding!
src/main/java/Dan.java
Outdated
| import java.util.Arrays; | ||
| import java.util.Scanner; | ||
|
|
||
| enum TASK_TYPE {TODO, DEADLINE, EVENT} |
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 on setting your ToDos as enums!
src/main/java/Dan.java
Outdated
| command = texts[0].toLowerCase(); | ||
| switch (command) { | ||
| case "bye": | ||
| break a; |
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 better if you can extract these 'instructions' out to a Ui class
src/main/java/Dan.java
Outdated
| try { | ||
| text = new Scanner(System.in).nextLine(); | ||
| texts = text.split(" "); | ||
| command = texts[0].toLowerCase(); |
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 extracting the commands to a Parser or Command class
starrylight99
left a comment
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.
pokemon exception, try to be more specific in catching your exceptions :)
renaming filePath to storagePath in Veneto.
added markTask() and unmarkTask() to avoid deep nesting and improved readability
added EXIT_SUFFIX to show operated command is ExitCommand added INCORRECT_ERROR to show unidentified error modifed COMMAND and make it looks better added three methods to improve readability added showOperationError() to deal with VenetoOperationException added showStorageError() to deal with VenetoStorageException added showInvalidError() to deal with unexpected exceptions
merging A-codequality to master
# Conflicts: # src/main/java/veneto/Veneto.java # src/main/java/veneto/ui/Ui.java Conflicts resolved
Ui.png
Veneto
Veneto frees your mind of having to remember things you need to do. It's,
FASTSUPER FAST to useAll you need to do is,
And it is FREE!
Features:
If you Java programmer, you can use it to practice Java too. Here's the
mainmethod: