Skip to content

[Isaac Lee] iP#643

Open
ais555 wants to merge 51 commits into
nus-cs2103-AY2526S1:masterfrom
ais555:master
Open

[Isaac Lee] iP#643
ais555 wants to merge 51 commits into
nus-cs2103-AY2526S1:masterfrom
ais555:master

Conversation

@ais555

@ais555 ais555 commented Sep 2, 2025

Copy link
Copy Markdown

John Chatter

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

John Chatter 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 a Java programmer, you can use it to practice Java too. Here's the main method:

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

damithc and others added 12 commits July 11, 2024 16:52
In build.gradle, the dependencies on distZip and/or distTar causes
the shadowJar task to generate a second JAR file for which the
mainClass.set("seedu.duke.Duke") does not take effect.
Hence, this additional JAR file cannot be run.
For this product, there is no need to generate a second JAR file
to begin with.

Let's remove this dependency from the build.gradle to prevent the
shadowJar task from generating the extra JAR file.
Rename Duke to john chatter, skeletal version that greets user and exits
Echo commands entered by the user and exit when the user types the command "bye"
Add ability to store text entered by user into a list and display them back when requested with the "list" command
Add a "Task" class and the ability to mark a task as done or undone with the "mark" and "unmark" commands.

@hwennnn hwennnn 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 code LGTM! The way you're dealing with different kind of tasks is very neat. One suggestion is to add more comments to explain your code. And more refactoring can be done for the main program to improve readability (which would be in the later section)

Comment thread src/main/java/JohnChatter.java Outdated
return;
} else if (input.equals("list")) {
for (int i = 1; i <= items.size(); i++) {
Task item = items.get(i -1);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

minor nit: there should be a space after -

Suggested change
Task item = items.get(i -1);
Task item = items.get(i - 1);

Comment thread src/main/java/JohnChatter.java Outdated
if (splitInputAroundSpace.length == 1) {
throw new JohnChatterException("oops! tasks must have a description");
}
Deadline deadline = new Deadline(input.split("deadline ")[1].split(" /by")[0], input.split("/by ")[1]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

To improve the readability of this line of code, you can consider naming the variables and pass that in to the constructor of the deadline

Comment thread src/main/java/JohnChatter.java Outdated
if (splitInputAroundSpace.length == 2 && splitInputAroundSpace[1].matches("\\d+")) {
int number = Integer.parseInt(splitInputAroundSpace[1]);
String task = items.get(number - 1).toString();
items.remove(number - 1);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It seems like u didn't handle for invalid delete index (i.e the index is out of bound)


@Override
public String toString() {
return "[D]" + super.toString() + " (by: " + 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.

perhaps can consider storing the task type [D] on the task class level for more abstraction

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

@Override
public String toString() {
return "[" + this.getStatusIcon() + "] " + this.description;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

very neat!

@IsaiahToh IsaiahToh 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. Like the name of the bot.

Comment thread src/main/java/Parser.java Outdated
public static String parse(String input, Ui ui, Storage storage, TaskList tasks) throws JohnChatterException {
ArrayList<Task> list = tasks.list;
String[] splitInputAroundSpace = input.split(" ");
if (input.equals("bye")) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This definitely works :) Maybe using switch would look cleaner though?

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.

5 participants