Tan Eu Zin iP#470
Conversation
This reverts commit 193dc5b.
BILLXYR
left a comment
There was a problem hiding this comment.
Two main problems observed: "the websites says: "Class variables should never be declared public"
So, perhaps it should not public." and " Plural form should be used on names representing a collection of objects." Others are fine 👍 Good job 👍
| System.out.println("Hello from\n" + logo); | ||
| System.out.println(logo + "\nHello im Eu Zin's Duke, he spent thursday afternoon creating me cuz he forgot abt the iP"); | ||
|
|
||
| ArrayList<Task> taskList = new ArrayList<>(); |
There was a problem hiding this comment.
From the websites it says that : "Plural form should be used on names representing a collection of objects."
So I think perhaps it should be taskLists instead of taskList.
| @@ -0,0 +1,18 @@ | |||
| public class Deadline extends Task { | |||
There was a problem hiding this comment.
the websites says: "Class variables should never be declared public"
So, perhaps it should not public.
| import java.util.Iterator; | ||
| import java.util.Scanner; | ||
|
|
||
| public class Duke { |
There was a problem hiding this comment.
the websites says: "Class variables should never be declared public"
So, perhaps it should not public.
| @@ -0,0 +1,7 @@ | |||
| public class DukeException extends Throwable { | |||
There was a problem hiding this comment.
the websites says: "Class variables should never be declared public"
So, perhaps it should not public.
| @@ -0,0 +1,18 @@ | |||
| public class Event extends Task{ | |||
There was a problem hiding this comment.
the websites says: "Class variables should never be declared public"
So, perhaps it should not public.
| @@ -0,0 +1,21 @@ | |||
| public class Task { | |||
There was a problem hiding this comment.
the websites says: "Class variables should never be declared public"
So, perhaps it should not public.
Implemented saving to and laoding from hard disk function
Implemented saving to and laoding from hard disk function
…rather than string
…and recognising LocalDate feature
# Conflicts: # src/main/java/TaskList.java # src/main/java/Ui.java
juandavinlie
left a comment
There was a problem hiding this comment.
Overall, your code is well written and understandable. Some names of variables and methods can be modified to make it self-explanatory. Good job!!
| boolean isDone = taskDataDivided[2].equals("1"); | ||
| switch (taskDataDivided[0]) { | ||
| case "E": | ||
| returnTaskList.add(new Event(taskDataDivided[2], taskDataDivided[3], isDone)); |
There was a problem hiding this comment.
Should taskDataDivided[0, 2, 3] be assigned to a variable that is self-descriptive? It would make the code easier to read and understand.
| * @return copy of ArrayList | ||
| */ | ||
| public ArrayList<Task> getList() { | ||
| ArrayList<Task> returnTaskList = new ArrayList<>(); |
There was a problem hiding this comment.
It might be more appropriate to name this variable as taskList instead of returnTaskList since return is a verb and could refer to a function.
| * Add Task given to the list | ||
| * @param task |
There was a problem hiding this comment.
It is good to separate the description and parameter using a blank line.
| public ArrayList<Task> searchFor(String searchString) { | ||
| ArrayList<Task> returnArrayList = new ArrayList<>(); | ||
| for (Task task : taskList) { | ||
| if (task.getDescription().contains(searchString)) returnArrayList.add(task); |
There was a problem hiding this comment.
It may be better to use the Egyptian style when writing if-else statement as it becomes easier to read.
| return taskList.size(); | ||
| } | ||
|
|
||
| public ArrayList<Task> searchFor(String searchString) { |
There was a problem hiding this comment.
May be better to name it searchTaskWithName(String searchString), as it is understandable by just reading it.
All features of Duke available on GUI
…propriate before any processing
Pull Request for Assertions
# Conflicts: # src/main/java/Deadline.java # src/main/java/Duke.java
Made Exceptions more explicit so the user can know how to enter an appropriate command.
Added Product showcase screenshot
No description provided.