Skip to content
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

Open
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

panpannnnn
Copy link

@panpannnnn panpannnnn commented Jan 26, 2023

DukePro 😁

“Your mind is for having ideas, not holding them.” – David Allen (source)

DukePro is a very simple task tracker. It's

  • Easy to use
  • Text-based
  • Efficient

All you need to do is,

  1. Download it from here.
  2. Double-click it.
  3. Learn the functions from the help menu
  4. Sit back and let it manage tasks for you!

The new and improved DukePro allows you to,

  • Add tasks
  • Save current tasks for future use
  • Mark tasks as done or not done
  • Delete tasks
  • Find tasks using keywords (coming soon)

If you are a Java programmer, you can use it to practice Java too. Here's the main method:

public class Duke {
    public static void main(String[] args) throws DukeException {
        UI ui = new UI();
        TaskList list = new TaskList(100);
        Storage storage = new Storage(list);
        Parser parser = new Parser();
        ui.start();
        storage.findData();
        storage.connect();
        start(ui, list, storage, parser);
    }
}

Copy link

@kyueran kyueran left a 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!

Comment on lines +16 to +19
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";
Copy link

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

Comment on lines 22 to 30
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());
}
Copy link

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.

Comment on lines 40 to 42
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.");
Copy link

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() {

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

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.");

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.

}
} else if (cmd.startsWith("delete")) {
if (list.getSize() == 0) {
throw new DukeException("ʕ ゚ ● ゚ʔ :: ☹ OOPS!!! The list is empty!");

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 {

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.
Create find functionality
Duke: create a new case for finding a task
Parser: create a new method to find keyword of the task
Tasklist: create new method to gather matching tasks
UI: create a new method to display matching tasks
* branch-A-CodingStandard:
  Edit according to coding standards.
# Conflicts:
#	src/main/java/duke/Duke.java
#	src/main/java/duke/UI.java
Add checkstyle
Add GUI to duke
Add a 'help' menu
Add a 'retrieve data' feature for users using the GUI to load previous tasks
panpannnnn and others added 12 commits February 17, 2023 12:47
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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants