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

[Timothy Tay] iP #441

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

[Timothy Tay] iP #441

wants to merge 29 commits into from

Conversation

tim0tay
Copy link

@tim0tay tim0tay commented Feb 3, 2025

No description provided.

damithc and others added 18 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.
Copy link

@soonami69 soonami69 left a comment

Choose a reason for hiding this comment

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

Nice, readable code, with good adherence to code style and quality guidelines 👍

/**
* The AddDeadlineCommand class represents the command to add a deadline task.
*/
private static final String horizontalLine = "-------------------------------------------" +
Copy link

@soonami69 soonami69 Feb 4, 2025

Choose a reason for hiding this comment

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

I like how you broke this long line so as to not make the line too long!

@Override
public void execute(Ui ui, Storage storage) {
ToDoTask newTask = new ToDoTask(this.taskDescription);
String added = storage.addToList(newTask);

Choose a reason for hiding this comment

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

Perhaps a more descriptive name instead of added would be better?

/**
* The Parser class takes in user input and interprets it to perform the necessary actions.
*/
private static final String horizontalLine = "--------------------------------------------------------------------------------\n";

Choose a reason for hiding this comment

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

I think this line may be too long. Consider breaking it into two?

return commands;
case "mark":
try {
String[] mark = str.split("mark ", 2);

Choose a reason for hiding this comment

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

Perhaps a more intuitive variable name here? I don't quite understand what mark's purpose is based on its name.

LocalDate to = LocalDate.parse(timeline[1].trim(), DateTimeFormatter.ofPattern("MMM dd yyyy"));
commands.add(new AddEventCommand(
CommandType.EVENT, remainingParts[0].trim(), from, to));
if (isDone) {

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 boolean variables intuitively!

/**
* Prints the farewell message of the chatbot.
*/
public static void bye() {

Choose a reason for hiding this comment

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

I think this should be a verb. Maybe sayGoodbye?

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