-
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
[Ang Min Cher, Branda] iP #273
base: master
Are you sure you want to change the base?
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.
LGTM, can consider changing some minor style changes suggested. Good job overall!
if (super.isDone()) { | ||
return "D | 1 | " + super.getName() + " | " + this.deadline.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + "\n"; | ||
} else { | ||
return "D | 0 | " + super.getName() + " | " + this.deadline.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + "\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.
Can line break in the middle, before this.deadline.format
src/main/java/duke/UI.java
Outdated
public void mark(TaskList list, int index) { | ||
list.getTask(index - 1).setDone(); | ||
System.out.println("ʕ•̀ω•́ʔ✧ :: Nice! I've marked this task as done:\n " + list.getTask(index - 1).toString()); | ||
} | ||
|
||
public void unmark(TaskList list, int index) { | ||
list.getTask(index - 1).setUndone(); | ||
System.out.println("ʕ•̀ω•́ʔ✧ :: OK, I've marked this task as not done yet:\n " + list.getTask(index - 1).toString()); | ||
} |
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 break the line here to improve readability.
src/main/java/duke/UI.java
Outdated
System.out.println("ฅʕ'ᴥ'ʔฅ :: Got it. I've added this task:"); | ||
System.out.println(" " + list.getTask(list.getSize() - 1).toString()); | ||
System.out.println("ʕ•ᴥ•ʔっ :: Now you have " + list.getSize() + " task(s) in the list."); |
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 concatenate the strings first then call System.out.println on the overall string.
this.done = " "; | ||
} | ||
|
||
public boolean isDone() { |
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 naming of boolean in line with coding standards
src/main/java/duke/UI.java
Outdated
list.addTask(new Event(name, start, end)); | ||
System.out.println("ฅʕ'ᴥ'ʔฅ :: Got it. I've added this task:"); | ||
System.out.println(" " + list.getTask(list.getSize() - 1).toString()); | ||
System.out.println("ʕ•ᴥ•ʔっ :: Now you have " + list.getSize() + " task(s) in the list."); |
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 addition of emoticons to inject personality into duke. very good.
src/main/java/duke/Duke.java
Outdated
} | ||
} else if (cmd.startsWith("delete")) { | ||
if (list.getSize() == 0) { | ||
throw new DukeException("ʕ ゚ ● ゚ʔ :: ☹ OOPS!!! The list is empty!"); |
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 throwing of exception if trying to delete an empty list
@@ -0,0 +1,41 @@ | |||
plugins { |
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.
your stuff is very good!
Storage: change boolean naming to convention Duke: improve SLAP of the start() method Method was too long. Hence the implementation was split into different smaller methods.
* branch-A-CodingStandard: Edit according to coding standards.
# Conflicts: # src/main/java/duke/Duke.java # src/main/java/duke/UI.java
Add checkstyle
…sed in through the methods.
Add assert feature to tasklist methods to document assumptions that should hold.
Add assert feature to tasklist methods to document assumptions that should hold.
Add JavaDocs for each method and code comments. Check for readability. Consolidate duplicate conditional fragments for Duke.java
Branch-A-Assertions
Branch-A-CodeQuality
Add the C-Help extension. Actually added in an earlier commit: see commit 5f1c137
Change Duke to panpan (my own nickname:P)
Update README.md with the new user guide
DukePro 😁
DukePro is a very simple task tracker. It's
All you need to do is,
The new and improved DukePro allows you to,
If you are a Java programmer, you can use it to practice Java too. Here's the
main
method: