-
Notifications
You must be signed in to change notification settings - Fork 73
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 Zheng Fu Justin] iP #62
base: master
Are you sure you want to change the base?
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.
Reviewed with @Zhilin-Huang
src/main/java/Storage.java
Outdated
import java.util.List; | ||
|
||
public class Storage { | ||
private List<Task> myTasks = 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.
Is it enough to just import ArrayList class? Since I think you can directly define the type of myTasks as ArrayList.
src/main/java/Storage.java
Outdated
return myTasks.get(index - 1); | ||
} | ||
catch(Exception e) { | ||
return null; |
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 you can use Printer to give some error messages if any exception has been caught.
src/main/java/Duke.java
Outdated
String userInput; | ||
|
||
userInput = in.nextLine(); | ||
Task task = new Task(userInput); |
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.
Do you agree that the description of a task is actually the part after the first word of the user input? ( If according to the user input, we need create a task)
src/main/java/Duke.java
Outdated
public static void echoUntilBye() { | ||
boolean isBye = false; | ||
while (!isBye) { | ||
Task task = readFromUser(); |
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.
I think we can create a new Task only after we get the command which requires to do so.Since if the command is "list" or "bye", then there is no need to so.
…specific message for todo clas
added find for level-9
added A-JavaDoc
No description provided.