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

[samriddh2145] iP #645

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

Conversation

samriddh2145
Copy link

@samriddh2145 samriddh2145 commented Sep 4, 2024

Bing - Your Personal Task Manager

“Efficiency is doing things right, Effectiveness is doing the right things.” – Peter Drucker

Bing helps you manage your tasks effectively, so you can focus on what truly matters. It's:

  • intuitive
  • flexible
  • FAST and efficient to use

All you need to do is:

  1. Download it from here.
  2. Open the application.
  3. Start adding your tasks.
  4. Let Bing manage your tasks for you 😊.

Features:

  • Manage to-do tasks
  • Set deadlines for tasks
  • Manage events with start and end times
  • Delete tasks
  • Find tasks

Code Example:

public class Bing {

    private List<Task> tasks;

    public Bing() {
        this.tasks = new ArrayList<>();
    }

    public void addTask(Task task) {
        tasks.add(task);
    }

    public List<Task> getTasks() {
        return tasks;
    }
}

damithc and others added 10 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

@brianchoon brianchoon left a comment

Choose a reason for hiding this comment

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

Overall, I found your code easy to read. Perhaps you may have repeated some code, which you can easily fix!

System.out.println("______________________________\n");
} else if (input.startsWith("mark")) {
int x = Integer.parseInt(input.substring(5));
if (x>0 && x<=tasks.size()) {

Choose a reason for hiding this comment

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

Perhaps you may use some spacing around the characters here?


} else if (input.startsWith("unmark")) {
int x = Integer.parseInt(input.substring(7));
if (x>0 && x<=tasks.size()) {

Choose a reason for hiding this comment

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

Perhaps you may use some spacing around the characters here too?

String message = "______________________________\n"
+ "Hi! My name is Bing\n"
+ "How can I help you?\n"
+ "______________________________\n";

Choose a reason for hiding this comment

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

I notice you have many areas in your code where you are using a string of underscores to denote a line. You may consider declaring a variable, e.g. LINE, to avoid code repetition!

this.to = to;
}


Choose a reason for hiding this comment

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

Nit: Unnecessary newline

Copy link

@starbucksventi starbucksventi left a comment

Choose a reason for hiding this comment

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

Overall, some refactoring & adding of JavaDoc comments seems to be required for code readability. Otherwise, looks good to merge!

private String info;
private TaskStatus isDone;

public Task(String info) {

Choose a reason for hiding this comment

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

Consider adding a JavaDoc comment to the explain constructor for this class.

this.StatusSymbol = StatusSymbol;
}

public String getStatusSymbol() {

Choose a reason for hiding this comment

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

Consider adding a Javadoc comment for this. Specifically, what is the status that is returned about.


private String deadline;

public Deadline(String info, String deadline) {

Choose a reason for hiding this comment

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

Consider adding a JavaDoc comment for this as it will likely cause a Checkstyle error, since public constructors are required to have such a comment.

import java.util.Scanner;
import java.util.ArrayList;
public class Bing {
public static void main(String[] args) {

Choose a reason for hiding this comment

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

Consider abstracting away portions of your code to helper methods and then refactoring your code to match the OOP style of coding. Kudos on the extensive error handling nonetheless!

Add changes to improve code quality
Implemented a new 'stats' command that provides users with insights into their tasks. The statistics include the total number of tasks, the number of marked and the number of unmarked tasks.
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