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

[ChangruHenryQian] iP #544

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

Conversation

ChangruHenryQian
Copy link

@ChangruHenryQian ChangruHenryQian commented Sep 4, 2023

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();
    }

Copy link

@rionshocker rionshocker left a comment

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.

private Storage storage;
private TaskList tasks;
private Ui ui = new Ui();
private static final String filePath = "./data/duke.txt";

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";

}

public void parse() {
try{

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?

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];

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;

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() {

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