-
Notifications
You must be signed in to change notification settings - Fork 116
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
[AdiMangalam] ip #111
base: master
Are you sure you want to change the base?
[AdiMangalam] ip #111
Conversation
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 great job on code quality!
src/main/java/Flash.java
Outdated
} | ||
|
||
public static void event(String input) { | ||
String[] parts = input.substring(6).split(" /from | /to"); |
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.
Avoid using magic numbers like substring(6).split. Used named constants for these numbers instead.
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.
well done. no noticeable coding standard violation
@@ -0,0 +1,107 @@ | |||
import java.sql.Array; | |||
import java.util.Scanner; |
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.
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
src/main/java/Task.java
Outdated
@@ -0,0 +1,31 @@ | |||
public class Task { | |||
protected String description; | |||
protected boolean isDone; |
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.
well done. code has proper and regular formatting and is easily understood
src/main/java/Deadline.java
Outdated
public class Deadline extends Task{ | ||
protected String by; | ||
|
||
public Deadline(String description, String by) { |
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.
has proper use of inheritance and no noticeable formatting issues.
src/main/java/Deadline.java
Outdated
|
||
@Override | ||
public String toString() { | ||
return "[D]" + super.toString() + "(by: " + by + ")" ; |
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.
proper use of overiding and with clear comments
src/main/java/Event.java
Outdated
this.from = from; | ||
this.to = to; | ||
} | ||
|
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.
proper use of overiding and with clear comments
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! |
import java.util.List; | ||
import java.util.ArrayList; | ||
|
||
public class Flash { |
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.
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.).
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) { |
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.
Add a specific check for missing task numbers to improve the error handling instead of generic exception.
src/main/java/Flash.java
Outdated
System.out.println("____________________________________________________________"); | ||
} | ||
|
||
public static void markTask(String input) throws FlashException { |
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.
The logic for marking and unmarking tasks is almost identical. You can refactor this into a single method to avoid duplication.
No description provided.