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

[Wee Heng] IP #312

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

[Wee Heng] IP #312

wants to merge 58 commits into from

Conversation

Decaxical
Copy link

@Decaxical Decaxical commented Feb 1, 2022

DukePlus

"For every minute spent organizing, an hour is earned." – Benjamin Franklin ([source])(https://orderyourlife.com/blogs/blog/28-amazing-quotes-that-will-inspire-you-to-get-organized)

DukePlus helps you organize your tasks in the form of a task list!
It is:

  • Text-based
  • Intuitive
  • Useless EXTRAORDINARILY USEFUL

All you have to do to start using this amazing product is:

  1. Download it from here.
  2. Double-click it.
  3. Add ALL your task.
  4. Kick back and relax as DukePro manages your tasks for you 😉

Best part is DukePro costs as much as it's worth. I mean priceless is FREE!

Features:

  • Managing tasks
  • Search for relevant tasks
  • Sort according to the deadline (Coming soon)

If you are a Java Programmer, you can use it to practice Java too. Here's the main method:

public static void main(String[] args) {
        initialize();
        run();
}

damithc and others added 8 commits July 29, 2021 20:30
Echoes the commands inputted by the user
implemented the ability to add tasks to a list and to display it
Added a new class task to help with marking and unmarking
made Todo, Event and Deadline extend from task
added input.txt and expected.txt and ensure test passed
Implemented DukeInvalidArgumentException and DukeException. handles when todo has no description and invalid command
Allows for deletion of tasks
}
Task taskToMark = taskList.get(taskToMarkNumber - 1);
taskToMark.markAsDone();
System.out.println("Duly noted. The following task has been marked as done");
Copy link

Choose a reason for hiding this comment

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

maybe can add a method displayMark for the print message as what you did earlier 👍

}
Task taskToUnmark = taskList.get(taskToUnmarkNumber - 1);
taskToUnmark.markAsNotDone();
System.out.println("Very well. The following task has been marked as undone");
Copy link

Choose a reason for hiding this comment

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

same as above displayUnmark


public class Task {
String content;
boolean markedDone = false;
Copy link

Choose a reason for hiding this comment

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

boolean var can be named as isDone

Comment on lines 18 to 29
public static void displayTaskList() {
if (taskList.isEmpty()) {
System.out.println("Your current task list is empty");
return;
}
int taskCounter = 1;
System.out.println("These are the current tasks in your list:");
for(Task task:taskList) {
System.out.printf("%d. %s \n", taskCounter, task.toString());
taskCounter++;
}
}
Copy link

Choose a reason for hiding this comment

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

Perhaps you can use a TaskList object to separate out each user's task lists and bundle away all related methods like displaying/adding/removing to the list?


public class Task {
String content;
boolean markedDone = false;
Copy link

Choose a reason for hiding this comment

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

Suggested change
boolean markedDone = false;
boolean isMarkedDone = false;

public class Duke {

private static ArrayList<Task> taskList;
private static Scanner getUserInput;
Copy link

Choose a reason for hiding this comment

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

getUserInput sounds like a method name. Perhaps consider changing it to

Suggested change
private static Scanner getUserInput;
private static Scanner sc;

Comment on lines 43 to 49
public static String[] parseArguments(String[] arguments) throws DukeInvalidArgumentException {
if (arguments.length < 2) {
throw new DukeInvalidArgumentException("There appears to be invalid arguments");
}

return arguments[1].split(" /([Aa][Tt]|[Bb][Yy]) ", 2);
}
Copy link

Choose a reason for hiding this comment

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

Maybe have some JavaDoc comments to explain non-trivial public methods?

package duke;

import duke.exceptions.DukeInvalidArgumentException;
import duke.tasks.*;
Copy link

Choose a reason for hiding this comment

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

Perhaps list all imported classes explicitly?

Duke is now able to save and load the tasklist across different sessions
Deadline and Event tasks now take in LocalDateTime
This reverts commit a2ce70c, reversing
changes made to 74a00d1.
Added functionality for storage to load tasks time as localdatetime
Extracted TextUI for interactions with user, Storage to load and save tasklist, Parser to parse inputs and Tasklist which contains tasklist operations
Removed unnecessary imports and fixed formatting
Added JUnit test for Parser parseCommand() and all functions in Task.
Also removed redundant functions from TaskList
Rectified mistake in Intellij compiler and fixed related bugs like text blocks.
fixed minor bugs like mark, unmark and delete allowing exceed of size. Improve UI
Added Java documentation and fixed a bug: delete command displaying wrong task being deleted.
Deleted unnecessary lines. Shortened code. Renamed variables.
Accommodate different time format in saveData
Allows users to search for tasks based on content.
Added a toString() for TaskList and removed DisplayTaskList() from ListCommand
Decaxical and others added 30 commits February 18, 2022 09:44
Javadoc for Find Command and related changes
Changed mainClassName in build.gradle
use FXML. Added resources and images.
Lack of assertions

Certain assumptions at various points in the code needs to be checked

Use assert method in java to validate assumptions like input

Let's add relevant assertions
Overlook certain aspects of code quality

Make code more readable and standardizing code formats

Extracting certain functions and adopt "drill down" function approach

Let's adhere to the code quality in the textbook
This reverts commit 75e98b3.
Overlook certain aspects of code quality

Make code more readable and standardizing code formats

Extracting certain functions and adopt "drill down" function approach

Let's adhere to the code quality in the textbook
Duke now has a sort command

sort command displays tasks based on what type of task they are and in order of when they are due. Task happening sooner are displayed first.
Update so Duke notifies user if a certain type of event is not in the list
Added userguide on how to quick start, features and command summary
Added bubble message. Change image. Reduced window size.
parseindex and parseDatetime throws error if not parsable
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

3 participants