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

[Xzh119] iP #450

Draft
wants to merge 58 commits into
base: master
Choose a base branch
from
Draft

[Xzh119] iP #450

wants to merge 58 commits into from

Conversation

Xzh119
Copy link

@Xzh119 Xzh119 commented Feb 3, 2025

Samantha

“Your mind is for having ideas, not holding them.” – David Allen (source)

Samantha, named after the emotional AI in the movie HER, frees your mind of having to remember things you need to do. It's,

  • text-based
  • easy to learn
  • FAST SUPER FAST to use

All you need to do is,

  1. download it from here.
  2. double-click it.
  3. add your tasks.
  4. let it manage your tasks for you 😉

And it is FREE!

Features:

  • Managing tasks
  • Managing deadlines (coming soon)
  • Reminders (coming soon)

If you are a Java programmer, you can use it to practice Java too. Here's the main method:

public class Main {
    public static void main(String[] args) {
        Application.launch(MainApp.class, args);
    }
}

damithc and others added 11 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

@blobfish465 blobfish465 left a comment

Choose a reason for hiding this comment

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

Overall I found your code easy to read for the most part, except for some areas where there were minor coding standard errors such as missing spacing and lines. You might want to consider splitting some single lines into several lines so it is easier to read.

} else {
if (taskSum > 99) {
System.out.println(" List is full.");
}else {

Choose a reason for hiding this comment

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

Should there be a space between { and else?

this.isDone = false;
}

public String getStatusIcon() {

Choose a reason for hiding this comment

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

Good use of a camelCase for method naming.

@@ -0,0 +1,26 @@
public class Task {
protected String description;
protected boolean isDone;

Choose a reason for hiding this comment

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

Good use of a boolean naming convention.

Comment on lines 1 to 5
public class SamanthaException extends Exception {
public SamanthaException(String message) {
super(message);
}
}

Choose a reason for hiding this comment

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

Should there be more specific exceptions e.g. NumberFormatException, IndexOutOfBoundsException ?

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

Choose a reason for hiding this comment

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

You might want to leave a line below this statement before defining your public class

Copy link

@Taoseeker Taoseeker left a comment

Choose a reason for hiding this comment

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

The code LGTM, despite some possible improvement in following coding standard. Additaionally, I like how the naming explain the usage of a field/method clearly.

String type = parts[0];

switch (type) {
case "T":

Choose a reason for hiding this comment

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

Maybe the indentation for case clauses could be removed according to coding standard?

@@ -0,0 +1,48 @@
public class Task {

Choose a reason for hiding this comment

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

Should Task be an abstract class instead?

String[] parts = line.split(" \\| ");
boolean isDone = parts[1].equals("1");
Deadline task = new Deadline(parts[2], parts[3]);
if (isDone) task.markAsDone();

Choose a reason for hiding this comment

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

Maybe if should be followed by a block?

许喆昊 and others added 30 commits February 14, 2025 12:16
The `parseCommand` method does not have assertions to verify
the validity of inputs. This may lead to unexpected runtime errors.

Add assertions to ensure inputs meet expected conditions. Assertions
check for null command and properly formatted commands.

This helps catch potential bugs early and improves code robustness by
preventing invalid operations before they can cause failures.
Merge branch 'master' into branch-A-CodeQuality
It needs to be change as it affects the purpose of listing.

It is fixed by preventing the "\n" at the end.

It is done this way because it is reasonable and easy.
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