-
Notifications
You must be signed in to change notification settings - Fork 438
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
Tan Eu Zin iP #470
base: master
Are you sure you want to change the base?
Tan Eu Zin iP #470
Conversation
This reverts commit 193dc5b.
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.
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 👍
src/main/java/Duke.java
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the websites says: "Class variables should never be declared public"
So, perhaps it should not public.
import java.util.ArrayList; | ||
import java.util.Iterator; | ||
import java.util.Scanner; | ||
|
||
public class Duke { |
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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, your code is well written and understandable. Some names of variables and methods can be modified to make it self-explanatory. Good job!!
src/main/java/TaskList.java
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.