Open
Conversation
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.
The Storage class has the task creation logic embedded within the textFileToArrayList method. This causes the code to be cluttered and harder to read. Refactoring the task creation logic into separate methods allows others looking at the textFileToArrayList method to easily understand its function. Let's refactor the task creation logic by extracting the following methods: - createTask: Creates Task based on taskSymbol - createTodoTask: Creates Todo Task - createDeadlineTask: Creates Deadline Task - createEventTask: Creates Event Task This approach simplifies the process of adding new Task types in the future, enhances the overall code clarity, and improves readability
Add assert statements to code
Adhere to Java code quality standard
The Storage class methods lack documentation, making it difficult for other developers to understand their functionality and usage. Let's add Javadoc comments to each method in the Storage class to provide clear explanations of their purpose. This documentation will enhance code readability and facilitate maintenance by ensuring that all methods are well-explained.
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.
DukePro
DukePro frees your mind of having to remember things you need to do. It's,
FASTSUPER FAST to useAll you need to do is,
And it is FREE!
Features:
If you are a Java programmer, you can use it to practice Java too. Here's the
mainmethod: