Skip to content

[audipras] iP - #629

Open
audipras wants to merge 48 commits into
nus-cs2103-AY2425S1:masterfrom
audipras:master
Open

[audipras] iP#629
audipras wants to merge 48 commits into
nus-cs2103-AY2425S1:masterfrom
audipras:master

Conversation

@audipras

@audipras audipras commented Sep 2, 2024

Copy link
Copy Markdown

MAGA Chatbot

"Despite the negative press covfefe." - Donald Trump (source)

The release of this chatbot is yuuuuuge - like, YUUUGE. It's gonna solve ALL your task-related problems. Just trust me - its the best 👌. It has:

  • Easy text interface
  • Simple, easy commands
  • TRUMP DRUMPF SPEECH

Features:

  • Create tasks
  • Mark tasks complete
  • Create events and deadlines

People who endorse this app:

  1. Me (Donald Trump)
  2. The people of America
  3. Crooked Kamala (Yes, even her!)

I support all jobs and occupations in America - yes, even our dear musicians and artists. Look at the beautiful art this bot has:

    private void printGreeting() {
        String logo = "  __  __                    \n"
                + " |  \\/  |  __ _   __ _   __ _  \n"
                + " | |\\/| | / _` | / _` | / _` | \n"
                + " | |  | || (_| || (_| || (_| || \n"
                + " |_|  |_| \\__,_| \\__, | \\__,_|  \n"
                + "                  |___/                           \n";
        System.out.println("Hello from\n" + logo +"\nI am THE best chatbot from the one and only" +
                " US of A trust me everyone says I'm the best. How can I help you serve the American people?" );
    }

Download this bot nowww 👌 - Make America Great Again!!

damithc and others added 19 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.
This reverts commit 66ca9d2.

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

In summary, your code largely follows good naming conventions, which significantly contributes to its readability and maintainability. The main areas for improvement are in using more descriptive class names and avoiding abbreviations like descrip. These changes will make your code even more intuitive and easier for others to understand.

Keep up the good work! :))

Comment thread src/main/java/Parser.java Outdated
@@ -0,0 +1,80 @@
import task.TaskList;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Parser is a good name for a class responsible for parsing input. It clearly describes its purpose. Well done here!

Comment thread src/main/java/Maga.java Outdated
private void run() {
printGreeting();
TaskManager taskManager = new TaskManager();
TaskList taskList = initialiseBot(taskManager);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

accurately describes the action it performs, which is good practice.

Comment thread src/main/java/task/TaskList.java Outdated
}

public void deleteTask(int taskNumber) {
Task tempTask = taskList[taskNumber];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

tempTask is used to refer to a task temporarily during deletion or other operations, very well used!

Comment thread src/main/java/task/TaskList.java Outdated
}
}

public void addTask(String input) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The variable input is well-named as it clearly indicates that it holds user input. It is appropriately concise and descriptive.

Comment thread src/main/java/task/TaskList.java Outdated
public void addTask(String input) {
Task task = new TodoTask("");
if(input.startsWith("todo ")) {
String descrip = input.substring(5).trim();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The abbreviation descrip is a bit unclear at first glance. It would be better to use the full word description for clarity.

@adipanda2002 adipanda2002 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. Your OOP principles are generally well followed in your code. I feel the readability of your code could be enhanced by adding in Javadoc comments, and also perhaps using enums. Some other nits to fix here and there.

Comment thread src/main/java/Maga.java Outdated
import task.TaskList;
import task.TaskManager;

public class Maga {

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 your use of OOP concepts to make your main class clean and easy to read

Comment thread src/main/java/Parser.java Outdated
continue;
}

// mark tasks as done

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

comments to explain each command follow coding style well and helpful in understanding the code

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

public void handleInput(String input) {
while(!input.equalsIgnoreCase("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.

You could consider the use of enums instead of representing Tasks as Strings.

Comment thread src/main/java/Maga.java Outdated
private TaskList initialiseBot(TaskManager taskManager) {
return taskManager.loadTasks();
}

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 think you are missing Javadoc commands across your codebase? I understand it is time consuming, but perhaps writing javadocs for at least the key methods will enable future readers of your code to understand it more seamlessly.

Comment thread src/main/java/task/Task.java Outdated
String to = parts[4];
return new DeadlineTask(isDone, description, from, 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.

Did you mean to have 'from' and 'to' parameters for Deadline and 'dateTime' for Event? Logically speaking, they should be the other way around don't you think?

public TaskList loadTasks() {
TaskList tasks = new TaskList(100);
File file = new File(FILE_PATH);

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 that you are sticking to the style when it comes to indenting comments relative to their position in the code

audipras and others added 20 commits September 5, 2024 16:52
Using the exit command now properly closes
javafx window after a pause.

Bot now properly saves tasks
to the task file after every change
to the task list.
Create packages 'ui', 'middleware', 'commands'
and 'exceptions' to further organise code.
Tagging tasks is unavailable.

User can't categorise tasks since description can't be changed.

Add new 'tag' string field to each task, and add new 'tag' command so
users can tag current tasks.
No help manual for the user.

Create user guide to orient the user on how to use the bot.

The user can immediately use the bot without facing errors with bot
usage.
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