-
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
[Wei Yang] iP #58
base: master
Are you sure you want to change the base?
[Wei Yang] iP #58
Conversation
Add toolVersion block in to Gradle code sample to prevent errors.
Change file mode on `gradle` to be executable (nus-cs2113-AY1920S2#9)
Gradle defaults to an empty stdin which results in runtime exceptions when attempting to read from `System.in`. Let's add some sensible defaults for students who may still need to work with the standard input stream.
Add configuration for console applications
The OpenJFX plugin expects applications to be modular and bundled with jlink, resulting in fat jars that are not cross-platform. Let's manually include the required dependencies so that shadow can package them properly.
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.
Great job for your code. It looks well implemented 👍 🥇
Looks like you put in a lot of effort and know your stuff
src/main/java/Duke.java
Outdated
@@ -1,10 +1,153 @@ | |||
import java.awt.*; |
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.
Try to only import library that are necessary for your code
src/main/java/Duke.java
Outdated
System.out.println("Here are the tasks in your list:"); | ||
} | ||
for (int i=0; i<userList.size(); i++) { | ||
Integer index = i+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.
Should the naming be more specific? e.g. listIndex
src/main/java/Duke.java
Outdated
ArrayList<String> words = new ArrayList<String>(Arrays.asList(userInput.split(" "))); | ||
words.remove(0); | ||
return new Todo (String.join(" ", words)); | ||
} |
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.
Great way of initialization for your tasks
src/main/java/Duke.java
Outdated
} | ||
userInput = in.nextLine(); | ||
} | ||
System.out.print(lines + "Bye. Hope to see you again soon!\n" + lines); |
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.
Would it be clearer to get the userInput in another method rather than putting it in your botResponse method?
…rted files into package.
…e pass by value, ie object address are copied in params
Level 8 complete
Level 9 complete
No description provided.