Skip to content

[AdiMangalam] ip#111

Open
AdiMangalam wants to merge 29 commits into
nus-cs2113-AY2425S1:masterfrom
AdiMangalam:master
Open

[AdiMangalam] ip#111
AdiMangalam wants to merge 29 commits into
nus-cs2113-AY2425S1:masterfrom
AdiMangalam:master

Conversation

@AdiMangalam

Copy link
Copy Markdown

No description provided.

@lucas-sc0 lucas-sc0 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overall great job on code quality!

Comment thread src/main/java/Flash.java Outdated
}

public static void event(String input) {
String[] parts = input.substring(6).split(" /from | /to");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Avoid using magic numbers like substring(6).split. Used named constants for these numbers instead.

@kennethszj kennethszj left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

well done. no noticeable coding standard violation

Comment thread src/main/java/Flash.java
@@ -0,0 +1,107 @@
import java.sql.Array;
import java.util.Scanner;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

well done. code functionality is implemented with well organized methods and with naming that describes the purpose well, and is in camelCase. if else statement is also in egyptian format

Comment thread src/main/java/Task.java Outdated
@@ -0,0 +1,31 @@
public class Task {
protected String description;
protected boolean isDone;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

well done. code has proper and regular formatting and is easily understood

Comment thread src/main/java/Deadline.java Outdated
public class Deadline extends Task{
protected String by;

public Deadline(String description, String by) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

has proper use of inheritance and no noticeable formatting issues.

Comment thread src/main/java/Deadline.java Outdated

@Override
public String toString() {
return "[D]" + super.toString() + "(by: " + by + ")" ;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

proper use of overiding and with clear comments

Comment thread src/main/java/Event.java Outdated
this.from = from;
this.to = to;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

proper use of overiding and with clear comments

@thoriritu

Copy link
Copy Markdown

Overall, function names and variables have been appropriately named, abstraction is properly shown. You could work on the documentation of code through the use of comments, so that it is more readable.

Good job!

Comment thread src/main/java/Flash.java
import java.util.List;
import java.util.ArrayList;

public class Flash {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

To improve abstraction, you can refactor the code by separating task-related logic from the main control flow. One class can handle the application's control logic (user interaction, commands) while another class can be responsible for managing tasks (adding, deleting, marking, saving, etc.).

Comment thread src/main/java/Flash.java Outdated
System.out.println("Nice! I've marked this task as done:");
System.out.println(" " + task);
System.out.println("____________________________________________________________");
} catch (Exception e) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Add a specific check for missing task numbers to improve the error handling instead of generic exception.

Comment thread src/main/java/Flash.java Outdated
System.out.println("____________________________________________________________");
}

public static void markTask(String input) throws FlashException {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The logic for marking and unmarking tasks is almost identical. You can refactor this into a single method to avoid duplication.

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