-
Notifications
You must be signed in to change notification settings - Fork 429
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
[Melvan-Chan] iP #456
base: master
Are you sure you want to change the base?
[Melvan-Chan] iP #456
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall you have good code standard, sometimes you can make the code shorter and maybe the handle can be better. Good luck =)
src/main/java/Veronica.java
Outdated
break; | ||
} | ||
try { | ||
if (userInput.equalsIgnoreCase("bye")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can try switch -case to make the code more neats
src/main/java/Veronica.java
Outdated
System.out.println("Veronica: Bye. Hope to see you again soon! "); | ||
break; | ||
} else if (userInput.equalsIgnoreCase("list")) { | ||
System.out.println(" _________________________________________________________________________________________________"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you know that this line is the perfect size, because I think the screen varies from size to size. Perhaps, there is a better way to do this?
src/main/java/Veronica.java
Outdated
} catch (NumberFormatException e) { | ||
throw new VeronicaException("UHOH! Please enter a valid number after 'done'."); | ||
} | ||
} else if (userInput.startsWith("unmark ")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can take the first character of input and trim it to compare, maybe it is faster
src/main/java/Veronica.java
Outdated
} else if (userInput.startsWith("remove ")) { // Remove task | ||
try { | ||
int taskIndex = Integer.parseInt(userInput.substring(7)) - 1; | ||
if (taskIndex >= 0 && taskIndex < taskCount) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is good that you check the validation, but I think it is better to have a separate class to handle
src/main/java/Veronica.java
Outdated
|
||
if (parts.length == 3) { | ||
tasks[taskCount++] = new Event(parts[0], parts[1], parts[2]); | ||
System.out.println(" _________________________________________________________________________________________________"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use the """ line to avoid print so many line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall! Might want to consider splitting your main java file to reduce clutter in a long run 😄
src/main/java/Deadline.java
Outdated
@@ -0,0 +1,13 @@ | |||
public class Deadline extends Task { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! This class follows recommended coding standard.
src/main/java/Task.java
Outdated
} | ||
|
||
public String toString() { | ||
return "[" + type.name().charAt(0) + "][" + this.getStatus() + "] " + this.description; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps you might want to separate the statement by adding a newline before each “+”.
src/main/java/TaskType.java
Outdated
@@ -0,0 +1,3 @@ | |||
public enum TaskType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Short and concise!
src/main/java/Veronica.java
Outdated
public class Veronica { | ||
public static void main(String[] args) { | ||
String greet = """ | ||
_________________________________________________________________________________________________ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work with the decluttering of long statements!
src/main/java/Veronica.java
Outdated
@@ -0,0 +1,152 @@ | |||
import java.util.Scanner; | |||
|
|||
public class Veronica { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps you might want to split this file into different sub-files
- commands
- interactions
Add Parser, TaskManager and Ui
Add gradle support
This commit integrates a JavaFX-based graphical user interface (GUI) for Veronica, replacing the previous text-based interface. The new UI provides a more user-friendly experience with interactive elements such as buttons, text fields, and dynamically updated task displays. Key changes: - Implemented JavaFX main application window. - Added controllers for handling user input and UI updates. - Updated task display to reflect real-time changes. - Refactored existing CLI-based methods to work with JavaFX components.
Added assertion checks to various methods in Veronica to ensure that key conditions hold true during runtime. The assertions help identify potential errors during development, such as invalid inputs or invalid object states. This change aims to improve code reliability and provide early detection of logical errors, especially during debugging.
This reverts commit f2c71e0.
This reverts commit aa29f15.
The task manager now includes a sorting feature that orders tasks by type (ToDo, Deadline, Event) and due date,ensuring tasks are displayed in an organized manner.
Created a comprehensive User Guide for Veronica, documenting its functionality and usage. Added UI screenshots to enhance user understanding and navigation.
# Conflicts: # data/veronica_tasks.txt # src/main/java/veronica/task/TaskManager.java
# Conflicts: # src/main/java/veronica/main/Veronica.java # src/main/java/veronica/task/TaskManager.java
Veronica
"She who brings the victory."
Veronica is your personal task manager, designed to help you stay organized effortlessly. It’s:
Features:
How to get started: