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

[Tin Jingyao] iP #507

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

[Tin Jingyao] iP #507

wants to merge 45 commits into from

Conversation

tin-jy
Copy link

@tin-jy tin-jy commented Aug 29, 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 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);
    }
}

Copy link

@edricyeo edricyeo left a comment

Choose a reason for hiding this comment

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

Generally good effort!
I like the clear naming of classes, variables and methods.
I think generally you could split your code into different classes, and include JavaDocs for your classes and methods!

import java.util.ArrayList;
import java.util.Locale;
import java.util.Scanner;

public class Duke {

Choose a reason for hiding this comment

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

Perhaps apply OOP to split the Duke class into different smaller classes?


private static final ArrayList<Task> LIST_OF_THINGS = new ArrayList<>();

private abstract static class Task {

Choose a reason for hiding this comment

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

Maybe you could create Task as a separate class, instead of nesting it in the Duke class.

}
}

private static class EventTask extends Task {

Choose a reason for hiding this comment

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

I like how you named the different Tasks clearly! 👍

return false;
}
try {
Integer.parseInt(str.substring(7));

Choose a reason for hiding this comment

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

Perhaps you could consider using str.split(" ") rather than str.substring(7). May improve reusability of code instead of having to change the number according to the length of the command?

public class Duke {

private static final ArrayList<Task> LIST_OF_THINGS = new ArrayList<>();

Choose a reason for hiding this comment

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

Maybe you could consider extracting this out as a separate TaskList class, which would handle adding tasks, etc.

Copy link

@domoberzin domoberzin left a comment

Choose a reason for hiding this comment

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

Coding standard is generally adhered to w.r.t naming, but could extract out the different classes, as well as add JavaDocs. :)

import java.util.ArrayList;
import java.util.Locale;
import java.util.Scanner;

public class Duke {

Choose a reason for hiding this comment

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

Could split the class into various classes, i.e. TaskList, Event, Deadline, instead of putting them into one class

private static final ArrayList<Task> LIST_OF_THINGS = new ArrayList<>();

private abstract static class Task {
private final String task_name;

Choose a reason for hiding this comment

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

Should be camelcase formatting for variables

import java.util.ArrayList;
import java.util.Locale;
import java.util.Scanner;

public class Duke {

Choose a reason for hiding this comment

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

Could also add JavaDocs for documentation purposes

Comment on lines 3 to 5
public class Command {

}

Choose a reason for hiding this comment

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

I am curious why is this empty?

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

4 participants