[RandomNerd01] iP#682
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.
…types the command bye
…d 'list' command to display all stored tasks. Also allowed adding of tasks to list.
…mented 'mark' and 'unmark' commands to update task completion status. Updated task display format to show [X] for done and [ ] for not done. Introduced a Task class to encapsulate task data and behavior.
…out date/time. Deadline: Tasks with a deadline using /by. Event: Tasks with a start and end time using /from and /to.
…pected output files in text-ui-test folder.
… descriptions with error message, Handled unrecognized commands with error message
…ist to use ArrayList<Task>
… package called meowthecat
Lzkkuan
left a comment
There was a problem hiding this comment.
The code is awesome and the kitty is cute (●'◡'●). Just some small styling issues and it'll be perfect :D
| String cmd = CommandParser.commandType(line); | ||
|
|
||
| switch (cmd) { | ||
| case "bye": |
There was a problem hiding this comment.
Case clauses should not be indented (no extra indent under switch). probably can align case with switch per project style.
| for (int i = 0; i < all.size(); i++) { | ||
| sb.append((i + 1)).append(".").append(all.get(i)).append("\n"); | ||
| } | ||
| sb.append("____________________________________________________________"); |
There was a problem hiding this comment.
Magic string repeated many times. Can you consider extracting them to private static final String SEPARATOR = "_____..."; and reuse for maintainability?
| public void initialize() { | ||
| scrollPane.vvalueProperty().bind(dialogContainer.heightProperty()); | ||
| System.out.println("Classpath root -> " + getClass().getResource("/")); | ||
| System.out.println("Check cat.png -> " + getClass().getResource("/cat.PNG")); |
There was a problem hiding this comment.
Probably can remove debug System.out prints from production code and use a logger (or delete) to keep GUI output clean.
| meowImage = new Image(this.getClass().getResourceAsStream("/cat.PNG")); | ||
| } | ||
|
|
||
| /** Injects the Duke instance */ |
There was a problem hiding this comment.
Can change the Duke to meow to match the class
| fxmlLoader.load(); | ||
| } catch (IOException e) { | ||
| e.printStackTrace(); | ||
| System.out.println("Dialog.fxml"); |
There was a problem hiding this comment.
Although we know which file it is pointing at, but probably can consider a more straightforward path, like "/view/DialogBox.fxml". This better match the actual resource.
| @@ -0,0 +1,12 @@ | |||
| package meowthecat; | |||
There was a problem hiding this comment.
Can add a blank line between package and import. Also works for other files
Current situation: Some public methods lack defensive assertions and can be used incorrectly by callers (e.g. null/invalid inputs). This makes the project more brittle and harder to debug. Why change: Add targeted assertions to catch programmer mistakes early and to provide clearer failures during development and testing. What is done: Add assertions in MainWindow, DialogBox and MeowCat where necessary.
Current situation: A lot of the code does not follow java coding standard Why change: Improve developer experience by making code more readable What is done: Add Javadoc to public methods where missing. Follow java coding standard.
Current situation: Several places use imperative loops that are harder to understand. Why change: Streams express intent more clearly, making the code easier to reason about and test. What is done: Replace manual iteration with Stream pipeline in TaskCollection and MeowCat.
Add assertion checks so certain points in code no errors
Improve code style and clarity
Fix imports
Fix conflict issues
Fix conflict issues again
Use Java Streams to simplify collection processing.
MeowTheCat 😺
MeowTheCat is your purr-fect companion for managing tasks and deadlines—because who said productivity can't be cute?
It’s:
To get started:
Features
Sample Code
If you're a Java programmer, you can use MeowTheCat to practice Java as well. Here's a snippet from the
Main.javafile: