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

[Lik Hern] iP #488

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

[Lik Hern] iP #488

wants to merge 35 commits into from

Conversation

LikHern
Copy link

@LikHern LikHern commented Aug 27, 2022

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);
    }
}

break;
case BYE:
System.out.println("Bye. Hope to see you again soon!");
break UserInput;
Copy link

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!

Copy link

@yixiann yixiann left a comment

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.

Copy link

@TJun-Jie TJun-Jie left a comment

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.

this.at = at;
}

@Override
Copy link

Choose a reason for hiding this comment

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

Can write java docs

return isDone ? "X" : " ";
}

public void markAsDone() {
Copy link

Choose a reason for hiding this comment

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

Can write java docs


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

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

import java.time.format.DateTimeFormatter;

public class Deadline extends Task {
protected LocalDate by;
Copy link

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"?

@@ -0,0 +1,18 @@
public class Event extends Task {
protected String at;
Copy link

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
Copy link

MinHeinA commented Sep 4, 2022

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.

Copy link

@clarence-chew clarence-chew left a comment

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 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;

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?


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

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