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

[nicleejy] iP #181

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

[nicleejy] iP #181

wants to merge 53 commits into from

Conversation

nicleejy
Copy link

@nicleejy nicleejy commented Jan 24, 2023

Introducing UwU_TaskMaster

"Y-Y-Youw mind is fow having i-ideas, nyot howding them. UwU" – David Awwen (source)

UwU_TaskMastew fwees youw mind of having t-to wemembew things you nyeed t-to do. It's,

  • text-based
  • easy t-to weawn
  • FAST runs away SUPEW FAST t-to use

aww >w< you nyeed t-to do is,

  1. downwoad i-it fwom hewe.
  2. doubwe-cwick it.
  3. add youw tasks.
  4. wet i-it manyage youw tasks fow you 😉

And it is FWEE!

Features:

  • Managing to-dos
  • Managing deadlines
  • Managing events
  • Reminders (coming soon)

If you Java pwogwammew, you c-can use i-it t-to pwactice Java too. runs away Hewe's the x3 main method for the CLI version of UwU_TaskMaster:

/**
     * Runs the bot and reads in user input in a loop, parses it and responds accordingly
     * @param args program args
     */
    public static void main(String[] args) {

        System.out.println("Hewwo! I'm UwU_TaskMaster! How c-can I hewp you?!?");

        Scanner scanner = new Scanner(System.in);
        TaskFileReaderWriter taskReaderWriter = new TaskFileReaderWriter();


        TaskManager taskManager = taskReaderWriter.loadDataFromFile();

        if (!taskReaderWriter.createTaskFile()) {
            System.out.println("Error creating data file");
            return;
        }

        Parser parser = new Parser(taskManager);
        String input;

        while (true) {

            input = scanner.nextLine();

            if (input.contains("bye")) {

                if (!taskReaderWriter.updateTaskFile(taskManager)) {
                    System.out.println("Error updating data file");
                    return;
                }
                System.out.println(Format.formatResponse(Response.BYE_BYE.toString()));
                break;
            }

            String output = parser.processInput(input);

            System.out.println(Format.formatResponse(output));
        }
        scanner.close();
    }

damithc and others added 28 commits July 31, 2022 17:20
Merge task file changes to master
Merge date time processing feature into master
add gradle file wrapper to project
Merge find feature into master branch
Merge JavaDoc changes to master branch
Copy link

@ruiyigan ruiyigan left a comment

Choose a reason for hiding this comment

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

Overall, the coding standard is good! 👍 It follows the Java coding standard closely. There was only a minor issue I found regarding the naming of boolean methods.

Please let me know if you have any queries regarding my comments.

*
* @return boolean value indicating the success of the file creation.
*/
public boolean createTaskFile() {

Choose a reason for hiding this comment

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

Since this method returns a boolean, you may want to consider using a prefix such as is, has, was. Perhaps something like canCreateTaskFile or hasCreatedTaskFile?

* The TaskFileReaderWriter class provides methods for reading and writing tasks to and from a file.
* It includes methods for loading tasks from a file and updating a task file with tasks from a
* TaskManager object, and creating a new task file.
* @author Nicholas Lee
Copy link

@ruiyigan ruiyigan Jan 30, 2023

Choose a reason for hiding this comment

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

I like that you included @author in your comments.

* @param taskManager The TaskManager object containing the tasks to be written to the file.
* @return boolean value indicating the success of the file update operation.
*/
public boolean updateTaskFile(TaskManager taskManager) {

Choose a reason for hiding this comment

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

Similar comment as the one above

/**
* Various responses of UwU_TaskMaster
*/
public enum Response {

Choose a reason for hiding this comment

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

This is a good addition! It offers an easier way to manage responses. 👍

@@ -0,0 +1,2 @@
Deadline|false|eat food|23/12/2023 1200

Choose a reason for hiding this comment

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

Just a suggestion. Perhaps you want to include test.txt in your .gitignore file to prevent the constant file change when committing changes.

nicleejy and others added 25 commits February 2, 2023 02:04
Merge assertion updates into master
Users were previously unable to query for free times in their list of
tasks.

To resolve this issue, adding a new feature allowing users to state a
duration and the bot automatically finds a free slot if it exists.

Introduce FreeTimeBlock class to represent free timeslots with start and
end timings.

Implement getFreeTimes() method in the TaskManager class to find free
slots based on the user's schedule.

A different String representation of FreeTimeBlock is generated depending on
whether it is bounded or unbounded.

This update allows for more efficient time management, and improves user
experience.
Add query for free time slots in user schedule
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.

None yet

2 participants