Skip to content

[ChangruHenryQian] iP#544

Open
ChangruHenryQian wants to merge 59 commits into
nus-cs2103-AY2324S1:masterfrom
ChangruHenryQian:master
Open

[ChangruHenryQian] iP#544
ChangruHenryQian wants to merge 59 commits into
nus-cs2103-AY2324S1:masterfrom
ChangruHenryQian:master

Conversation

@ChangruHenryQian

@ChangruHenryQian ChangruHenryQian commented Sep 4, 2023

Copy link
Copy Markdown

Jarvis Chat Bot

Time for hard work

Jarvis 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 static void main(String[] args) {
        new Duke("data/tasks.txt").run();
    }

@rionshocker rionshocker 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 well done! Just some minor changes to be made. Can consider abstracting certain methods to different classes.

Comment thread src/main/java/Duke.java Outdated
private Storage storage;
private TaskList tasks;
private Ui ui = new Ui();
private static final String filePath = "./data/duke.txt";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Since it is a constant, may I suggest this change?

Suggested change
private static final String filePath = "./data/duke.txt";
private static final String FILE_PATH = "./data/duke.txt";

Comment thread src/main/java/duke/Parser.java Outdated
}

public void parse() {
try{

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

using switch statements may help reduce nesting. what do you think?

Comment thread src/main/java/duke/Parser.java Outdated
this.taskList.addTask(newToDo);
} else if (command.startsWith("deadline")) {
LocalDate deadline = LocalDate.parse(command.split(" /by ", 2)[1]);
String name = command.split(" /by ", 2)[0].split(" ", 2)[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.

Perhaps splitting them into multiple statements could improve the readability of the code. It can make it easier for you to debug your code too :)

@@ -0,0 +1,83 @@
package duke;

import java.io.File;

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 like how you have organised your imports according to their functionality. It's clear and easy to read. Great job!

return "[" + this.getStatusIcon() + "] " + this.description;
}

public String toTxt() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

just a trivial issue but would spelling out the txt improve the readability of your code?

QianChangru and others added 30 commits September 10, 2023 10:43
After implementing GUI, the entry point was changed.

Let's change mainClass into duke.Launcher.
The functional code is not capable of checking assumptions.

Assumptions may not be true in some cases and checking is required.

Let's add assert feature to document important assumptions.
Some parts of the code have bad code quality.

Improvements on code quality increase readability.

Let's improve code quality through methods such as refactoring.
# Conflicts:
#	src/main/java/duke/Storage.java
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