[AdiMangalam] ip#111
Conversation
lucas-sc0
left a comment
There was a problem hiding this comment.
Overall great job on code quality!
| } | ||
|
|
||
| public static void event(String input) { | ||
| String[] parts = input.substring(6).split(" /from | /to"); |
There was a problem hiding this comment.
Avoid using magic numbers like substring(6).split. Used named constants for these numbers instead.
kennethszj
left a comment
There was a problem hiding this comment.
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.
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
| @@ -0,0 +1,31 @@ | |||
| public class Task { | |||
| protected String description; | |||
| protected boolean isDone; | |||
There was a problem hiding this comment.
well done. code has proper and regular formatting and is easily understood
| public class Deadline extends Task{ | ||
| protected String by; | ||
|
|
||
| public Deadline(String description, String by) { |
There was a problem hiding this comment.
has proper use of inheritance and no noticeable formatting issues.
|
|
||
| @Override | ||
| public String toString() { | ||
| return "[D]" + super.toString() + "(by: " + by + ")" ; |
There was a problem hiding this comment.
proper use of overiding and with clear comments
| this.from = from; | ||
| this.to = to; | ||
| } | ||
|
|
There was a problem hiding this comment.
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.
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.).
| 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.
Add a specific check for missing task numbers to improve the error handling instead of generic exception.
| System.out.println("____________________________________________________________"); | ||
| } | ||
|
|
||
| public static void markTask(String input) throws FlashException { |
There was a problem hiding this comment.
The logic for marking and unmarking tasks is almost identical. You can refactor this into a single method to avoid duplication.
No description provided.