[Wee Heng] IP#312
Open
Decaxical wants to merge 58 commits into
Open
Conversation
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
hqhqhq1
reviewed
Feb 2, 2022
| } | ||
| Task taskToMark = taskList.get(taskToMarkNumber - 1); | ||
| taskToMark.markAsDone(); | ||
| System.out.println("Duly noted. The following task has been marked as done"); |
There was a problem hiding this comment.
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"); |
|
|
||
| public class Task { | ||
| String content; | ||
| boolean markedDone = false; |
tonishka
reviewed
Feb 5, 2022
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++; | ||
| } | ||
| } |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Suggested change
| boolean markedDone = false; | |
| boolean isMarkedDone = false; |
| public class Duke { | ||
|
|
||
| private static ArrayList<Task> taskList; | ||
| private static Scanner getUserInput; |
There was a problem hiding this comment.
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); | ||
| } |
There was a problem hiding this comment.
Maybe have some JavaDoc comments to explain non-trivial public methods?
| package duke; | ||
|
|
||
| import duke.exceptions.DukeInvalidArgumentException; | ||
| import duke.tasks.*; |
There was a problem hiding this comment.
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 74a00d1.
This reverts commit 738ca50.
This reverts commit 3f0f903.
This reverts commit e6993ef.
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
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 eb1d240.
This reverts commit eb1d240.
This reverts commit 75e98b3.
…into branch-A-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
Update Code Quality
Add Assertions
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.
Removed Data
parseindex and parseDatetime throws error if not parsable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DukePlus
DukePlus helps you organize your tasks in the form of a task list!
It is:
UselessEXTRAORDINARILY USEFULAll you have to do to start using this amazing product is:
Best part is DukePro
costs as much as it's worth. I mean pricelessis FREE!Features:
If you are a Java Programmer, you can use it to practice Java too. Here's the
mainmethod: