Skip to content

[Lik Hern] iP - #488

Open
LikHern wants to merge 35 commits into
nus-cs2103-AY2223S1:masterfrom
LikHern:master
Open

[Lik Hern] iP#488
LikHern wants to merge 35 commits into
nus-cs2103-AY2223S1:masterfrom
LikHern:master

Conversation

@LikHern

@LikHern LikHern commented Aug 27, 2022

Copy link
Copy Markdown

DukePro

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

DukePro frees your mind of having to remember things you need to do. It's,

  • text-based
  • easy to learn
  • FAST SUPER FAST to use

All you need to do is,

  1. download it from here.
  2. double-click it.
  3. add your tasks.
  4. let it manage your tasks for you 😉

And it is FREE!

Features:

  • Managing tasks
  • Managing deadlines (coming soon)
  • Reminders (coming soon)

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

public class Main {
    public static void main(String [] args) {
        Application.launch(MainApp.class, args);
    }
}

Comment thread src/main/java/Duke.java Outdated
break;
case BYE:
System.out.println("Bye. Hope to see you again soon!");
break UserInput;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting use of Java labels!

@yixiann yixiann left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally a good job. Code is simple and easy to understand and follow. Naming of variables are also appropriate.

@TJun-Jie TJun-Jie left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! However, you can write more javadocs.

Comment thread src/main/java/Event.java Outdated
this.at = at;
}

@Override

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can write java docs

Comment thread src/main/java/Task.java Outdated
return isDone ? "X" : " ";
}

public void markAsDone() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can write java docs

Comment thread src/main/java/Deadline.java Outdated

@Override
public String toString() {
return String.format("[D]%s (by: %s)", super.toString(), by.format(DateTimeFormatter.ofPattern("MMM dd yyyy")));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line too long, can break line in the middle

Comment thread src/main/java/Deadline.java Outdated
import java.time.format.DateTimeFormatter;

public class Deadline extends Task {
protected LocalDate by;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you could name the variable as "deadLineTime" instead of "by"?

Comment thread src/main/java/Event.java Outdated
@@ -0,0 +1,18 @@
public class Event extends Task {
protected String at;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just like the Deadline class, perhaps you can change the variable name from "at" to "eventTime"?

@MinHeinA

MinHeinA commented Sep 4, 2022

Copy link
Copy Markdown

Follows good OO practices, and good naming of variables. Related classes have not been placed in the same folder (package) and more JavaDocs could have been added.

@clarence-chew clarence-chew left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work so far, good luck with your iP!

Comment thread src/main/java/Duke.java Outdated
Comment on lines +69 to +88
case DEADLINE:
scanner.useDelimiter("/by");
String deadlineDescription = scanner.next().strip();
scanner.reset().skip("/by");
String deadlineBy = scanner.nextLine().strip();
Deadline deadlineTask = new Deadline(deadlineDescription, deadlineBy);
storage.add(deadlineTask);
System.out.println("Got it. I've added this task:\n" + deadlineTask
+ "\nNow you have " + storage.size() + " tasks in the list.");
break;
case EVENT:
scanner.useDelimiter("/at");
String eventDescription = scanner.next().strip();
scanner.reset().skip("/at");
String eventAt = scanner.nextLine().strip();
Event eventTask = new Event(eventDescription, eventAt);
storage.add(eventTask);
System.out.println("Got it. I've added this task:\n" + eventTask
+ "\nNow you have " + storage.size() + " tasks in the list.");
break;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code seems to repeat the concept of finding some delimiter, perhaps this can be abstracted?

Comment thread src/main/java/Task.java Outdated

protected Task(String description) {
this.description = description;
this.isDone = false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding standard suggests avoiding unnecessary use of this with fields. (isDone here, in particular.)
https://se-education.org/guides/conventions/java/index.html#variables

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.

7 participants