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

[Melvan-Chan] iP #456

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

Conversation

Melvan-Chan
Copy link

@Melvan-Chan Melvan-Chan commented Feb 4, 2025

Veronica

"She who brings the victory."

Veronica is your personal task manager, designed to help you stay organized effortlessly. It’s:

  • Text-based for quick and efficient task management.
  • Easy to use with simple commands.
  • Fast and reliable, so you spend less time managing and more time doing.

[!IMPORTANT]

Features:

  • Task management – Add, list, mark, and remove tasks ✅
  • Deadlines & Events – Set due dates and time-bound events✅
  • Task search – Find tasks quickly with keywords✅

🚀 More enhancements coming soon!

[!TIP]

How to get started:

  1. Download it from here.
  2. Run the program with a double-click.
  3. Add tasks like to-dos, deadlines, and events.
  4. Let Veronica keep track while you focus on what matters.

damithc and others added 18 commits July 11, 2024 16:52
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.
Copy link

@namprice227 namprice227 left a 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 =)

break;
}
try {
if (userInput.equalsIgnoreCase("bye")) {

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

System.out.println("Veronica: Bye. Hope to see you again soon! ");
break;
} else if (userInput.equalsIgnoreCase("list")) {
System.out.println(" _________________________________________________________________________________________________");

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?

} catch (NumberFormatException e) {
throw new VeronicaException("UHOH! Please enter a valid number after 'done'.");
}
} else if (userInput.startsWith("unmark ")) {

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

} else if (userInput.startsWith("remove ")) { // Remove task
try {
int taskIndex = Integer.parseInt(userInput.substring(7)) - 1;
if (taskIndex >= 0 && taskIndex < taskCount) {

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


if (parts.length == 3) {
tasks[taskCount++] = new Event(parts[0], parts[1], parts[2]);
System.out.println(" _________________________________________________________________________________________________");

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

Copy link

@0x4F776C 0x4F776C left a 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 😄

@@ -0,0 +1,13 @@
public class Deadline extends Task {
Copy link

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.

}

public String toString() {
return "[" + type.name().charAt(0) + "][" + this.getStatus() + "] " + this.description;
Copy link

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 “+”.

@@ -0,0 +1,3 @@
public enum TaskType {
Copy link

Choose a reason for hiding this comment

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

LGTM! Short and concise!

public class Veronica {
public static void main(String[] args) {
String greet = """
_________________________________________________________________________________________________
Copy link

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!

@@ -0,0 +1,152 @@
import java.util.Scanner;

public class Veronica {
Copy link

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

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.
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
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.

5 participants