Skip to content

[jonyeokj] iP#518

Open
jonyeokj wants to merge 39 commits into
nus-cs2103-AY2324S1:masterfrom
jonyeokj:master
Open

[jonyeokj] iP#518
jonyeokj wants to merge 39 commits into
nus-cs2103-AY2324S1:masterfrom
jonyeokj:master

Conversation

@jonyeokj

@jonyeokj jonyeokj commented Sep 2, 2023

Copy link
Copy Markdown

Martin Bot

Martin learned chess so that he could play with his young kids. He still beats them most of the time. (source)

Once a chess bot, now a chatbot!

Martin is:

  • 🖋 Text-based
  • 🎓 Easy to pick up
  • 🚄 FAST Super FAST to use

All you need to do is,

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

🎉 It's Absolutely Free! 🎉

Features:

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

If you're a 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);
    }
}

@Gavino3o Gavino3o 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.

Overall, the PR LGTM 👍. Some small changes can be considered but good progress has been made! Cheers and have a good day.

throw new InvalidCommandException("☹ OOPS!!! I'm sorry, but I don't know what that means :-(");
}

String[] parts = input.split(" ", 2);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good use of nouns and paid special attention to using plural forms when needed. Good job!

return new DateCommand(input, tasks);
case "find":
return new FindCommand(input, tasks);
default:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Default case included as per coding standard. 👍

Comment thread src/main/java/martin/task/Event.java Outdated

@Override
public String toString() {
return "[E][" + (isDone ? "X" : " ") + "] " + description + " (from: " + from + " to: " + to + ")";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider using String.format here, it makes the string more readable and easier to edit if required in the future.


String type = parts[0];

switch (type) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If it's only two conditions, consider using if else instead. But I can see the potential of including todos, events and more subtypes of Tasks in the future.

Comment thread src/main/java/martin/Ui.java Outdated
@@ -0,0 +1,37 @@
package martin;
import java.util.Scanner;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider adding JavaDocs for classes for a short description of what the class encapsulates or can do.

@wui-hong wui-hong 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.

Overall, LGTM. Only minor suggestions but they are nitpicks!

isDone = true;
}

public void unmarkAsDone() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Would it be more appropriate to rename the function to markAsUndone?

Comment thread src/main/java/martin/Ui.java Outdated
}

public void showLine() {
System.out.println(" ____________________________________________________________");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Perhaps adding the Line string as a constant would make your code more readable and reusable

Comment thread src/main/java/martin/Storage.java Outdated
Files.createFile(path);
}
Files.write(path, lines, StandardOpenOption.TRUNCATE_EXISTING);
} catch (IOException e) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good use of error handling throughout the code

}

ui.showLine();
System.out.println(" Tasks on " + date.format(DateTimeFormatter.ofPattern("M d 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.

Might be neater to split out the date formatting section onto a new line

@erohsikivar erohsikivar 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.

Overall LGTM. Just some minor things can be changed.

*
* @param message Error message to be printed out.
*/
public class InvalidCommandException extends MartinException {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I feel maybe don't so many classes for each exceptions since all your class methods are implementing same line of code super(message).

@@ -0,0 +1,63 @@
package martin.gui;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good to see that you have separate GUI package.

jonyeokj and others added 8 commits September 13, 2023 17:28
- Added assertions to handle null values for input in the MainWindow class.
- Ensured null responses are appropriately handled in the Martin class.
- Introduced error handling for scenarios where the input is empty.
Implement assertions for null values
Refactored code in the DateCommand class to minimize arrowhead style code. Also added javadoc headers for all the command messages briefly explaining what theydo, and cleaned up the headers for their respective execute() commands.
jonyeokj and others added 12 commits September 17, 2023 18:51
This commit introduces the snooze command for the task management app.
Users can now snooze their tasks, delaying them by a specified amount
of times in minutes.

Additionally, events now support the toFileFormat method.

Javadoc headers have also been added to all command class constructors.
Implement Snooze and enhance Event format
Implement SortCommand to enable task sorting functionality.
Extend the fromFileFormat method in Task to handle Event tasks.
Implement Sort Command and support for parsing Events
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.

4 participants