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

[audipras] iP #629

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

[audipras] iP #629

wants to merge 48 commits into from

Conversation

audipras
Copy link

@audipras audipras commented Sep 2, 2024

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.
Copy link

@dominic2412 dominic2412 left a comment

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! :))

@@ -0,0 +1,80 @@
import task.TaskList;

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!

private void run() {
printGreeting();
TaskManager taskManager = new TaskManager();
TaskList taskList = initialiseBot(taskManager);

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.

}

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

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!

}
}

public void addTask(String input) {

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.

public void addTask(String input) {
Task task = new TodoTask("");
if(input.startsWith("todo ")) {
String descrip = input.substring(5).trim();

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.

Copy link

@adipanda2002 adipanda2002 left a comment

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.

import task.TaskList;
import task.TaskManager;

public class Maga {

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

continue;
}

// mark tasks as done

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

}

public void handleInput(String input) {
while(!input.equalsIgnoreCase("bye")) {

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.

private TaskList initialiseBot(TaskManager taskManager) {
return taskManager.loadTasks();
}

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.

String to = parts[4];
return new DeadlineTask(isDone, description, from, to);
}

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

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