-
Notifications
You must be signed in to change notification settings - Fork 19
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
[Januarius Jang] iP #15
base: master
Are you sure you want to change the base?
Conversation
src/main/java/Deadline.java
Outdated
|
||
public Deadline (String description, String by){ | ||
super(description); | ||
this.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.
There should be a spacing between the assignment. ... I noticed the same issue in several other places too.
src/main/java/Deadline.java
Outdated
} | ||
@Override | ||
public String toString(){ | ||
return "[D]" + "["+ super.getStatusIcon()+ "]" + 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.
Perhaps the return statement can be stored in a String with an appropriate name?
src/main/java/Duke.java
Outdated
|
||
while(!textInput.equals("bye")) { | ||
|
||
String[]arrayOfStr=textInput.split(" ",2); |
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.
Perhaps give this a better name to give context to the String you are storing? ... I noticed the same issue in several other places too.
src/main/java/Duke.java
Outdated
switch (arrayOfStr[0]) { | ||
case "list": | ||
for (int i = 0; i < taskList.size();i++) | ||
{ |
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.
Java coding standard recommends Egyptian style braces
src/main/java/Duke.java
Outdated
|
||
case "done": | ||
int index=Integer.parseInt(arrayOfStr[1])-1; | ||
taskList.get(index).markAsDone(); |
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.
Perhaps this can be broken down into multiple line for better readability?... I noticed the same issue in several other places too.
src/main/java/Duke.java
Outdated
|
||
case "todo": | ||
Task t=new Todo(arrayOfStr[1]); | ||
taskList.add((t)); |
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.
There is no need for a double parentheses.
src/main/java/Duke.java
Outdated
|
||
case "deadline": | ||
String[]arrayOfDoneDetails=arrayOfStr[1].split("by ",2); | ||
Task d=new Deadline(arrayOfDoneDetails[0],arrayOfDoneDetails[1] ); |
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.
Perhaps assign array elements into a variable with an appropriate name?
src/main/java/Duke.java
Outdated
|
||
case "event": | ||
String[]arrayOfEventDetails=arrayOfStr[1].split("at ",2); | ||
//arrayOfDoneDetails[0] contains description, arrayOfDoneDetails[1] contains the date. |
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.
Maybe remove redundant comments ?
src/main/java/Duke.java
Outdated
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); | ||
String textInput = reader.readLine(); | ||
|
||
while(!textInput.equals("bye")) { |
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.
Innovative way of ending the continuous loop
added the delete task function
Implemented Find feature
Added JUnit testing
Add gradle support
* master: Integration with GUI
* 'master' of https://github.com/JanuariusJang/ip: Delete 1.txt Add files via upload Create 1.txt
No description provided.