Conversation
In build.gradle, the dependencies on distZip and/or distTar causes
the shadowJar task to generate a second JAR file for which the
mainClass.set("seedu.duke.Duke") does not take effect.
Hence, this additional JAR file cannot be run.
For this product, there is no need to generate a second JAR file
to begin with.
Let's remove this dependency from the build.gradle to prevent the
shadowJar task from generating the extra JAR file.
VikramGoyal23
left a comment
There was a problem hiding this comment.
There seems to be several small coding standard violations, but beyond that I only have a couple of nitpicks.
src/main/java/Whiost.java
Outdated
| @@ -0,0 +1,168 @@ | |||
| import java.io.BufferedReader; | |||
There was a problem hiding this comment.
You should put this class in a package, maybe main or whiost.
src/main/java/Whiost.java
Outdated
| String greeting = "Hello! I'm Whiost\nWhat can I do for you?\n"; | ||
| String addTask = "Got it. I've added this task:"; | ||
| String marked = "Nice! I've marked this task as done:"; | ||
| String unmarked = "OK, I've marked this task as not done yet:"; | ||
| String reportTask1 = "Now you have "; | ||
| String reportTask2 = " tasks in the list."; | ||
| String deleted = "Noted. I've removed this task:"; | ||
|
|
||
| String error0 = "OOPS!!! I'm sorry, but I don't know what that means."; | ||
| String errorEmpty = "OOPS!!! The description cannot be empty."; | ||
| String errorNotFound = "OOPS!!! The task you select doesn't exist."; | ||
| String errorEmptyList = "OOPS!!! There's no task."; |
There was a problem hiding this comment.
Since all of these strings are never reassigned, you should consider writing the variable names in SCREAMING_SNAKE_CASE to indicate they are constants.
src/main/java/Whiost.java
Outdated
| String reportTask2 = " tasks in the list."; | ||
| String deleted = "Noted. I've removed this task:"; | ||
|
|
||
| String error0 = "OOPS!!! I'm sorry, but I don't know what that means."; |
There was a problem hiding this comment.
error0 is a quite undescriptive variable name, maybe errorUnknown or errorInvalidInput could be better.
src/main/java/Whiost.java
Outdated
| // Print greeting | ||
| System.out.print(greeting); | ||
|
|
||
| boolean p = true; |
There was a problem hiding this comment.
p is a very undescriptive variable name, maybe something like isInputting could be better (it should at least sound like a boolean variable).
src/main/java/Whiost.java
Outdated
|
|
||
| try { | ||
| BufferedReader data = new BufferedReader(new FileReader("./data/whiost.txt")); | ||
| List<String> temp_lst = new ArrayList<String>(); |
There was a problem hiding this comment.
Variables should not be written in snake_case, you should change the variable name to tempLst.
src/main/java/Whiost.java
Outdated
| import java.util.List; | ||
|
|
||
| public class Whiost { | ||
| public static void save(List<String> lst, List<String> typeLst, List<String> markLst) { |
There was a problem hiding this comment.
Consider adding a JavaDoc header for this method to explain what it does..
src/main/java/Whiost.java
Outdated
| import java.util.ArrayList; | ||
| import java.util.List; | ||
|
|
||
| public class Whiost { |
There was a problem hiding this comment.
Consider adding a JavaDoc header for the class to explain what it does.
src/main/java/Whiost.java
Outdated
There was a problem hiding this comment.
Try and use more abstraction (e.g. separate classes) for the different types of tasks the bot will keep track of.
Add assertion line
* 'master' of https://github.com/Gu0Fengming/ip: Add assertion line
Advance code quality
No description provided.