[AY1920S1-CS2113-T14-3] WordUp#96
[AY1920S1-CS2113-T14-3] WordUp#96tessa-z wants to merge 526 commits intonusCS2113-AY1920S1:masterfrom
Conversation
leowweixiang
left a comment
There was a problem hiding this comment.
General:
In terms of features and code I think y'all are on a good track :) What's lacking are unit tests (important!!) and header comments on public methods.
src/main/java/Dictionary/Word.java
Outdated
| * String represents the closest time that user search | ||
| * for a specific word | ||
| */ | ||
| private String closetSearch; |
There was a problem hiding this comment.
closestSearch you mean?
To clarify, closest time -> this is a string containing a time format?
| } | ||
|
|
||
| /** | ||
| * Looks up for meaning of a specific word |
There was a problem hiding this comment.
Good to add here that "if word is not in Wordbank, call OxfordCall to find the word"
| import storage.Storage; | ||
| import ui.Ui; | ||
|
|
||
| /** |
There was a problem hiding this comment.
Add such headers for other command subclasses. Also, if the execute() is nontrivial (long code), do add a header explain what it does and how
| return "https://od-api.oxforddictionaries.com/api/v2/entries/" + language + "/" + word_id + "?" + "fields=" + fields + "&strictMatch=" + strictMatch; | ||
| } | ||
|
|
||
| public static String doInBackground(String word) throws NoWordFoundException { |
There was a problem hiding this comment.
Add header comment for these public methods
src/main/java/parser/Parser.java
Outdated
| throw new WrongDeleteFormatException(); | ||
| } | ||
| String[] wordAndTags = taskInfo[1].split("t/"); | ||
| //delete word |
There was a problem hiding this comment.
Good, short comment that lets others zoom into specific code
src/main/java/parser/Parser.java
Outdated
| if (taskInfo.length == 1) { | ||
| throw new WrongAddFormatException(); | ||
| } | ||
| String[] wordDetail = taskInfo[1].split("w/"); |
There was a problem hiding this comment.
Again consider putting your "w/" etc as private static final attribs
src/main/java/storage/Storage.java
Outdated
| } | ||
| } | ||
|
|
||
| public Stack<Word> loadHistoryFromFile() { |
There was a problem hiding this comment.
Header comment. Make explicit the difference between loadHistory and loadWordBank (Stack structure, why)
Also, the code is very similar. Can both be done in one method, or are there times you have to load each separately?
| } | ||
| return wordBank; | ||
| } catch (IOException e) { | ||
| e.printStackTrace(); |
There was a problem hiding this comment.
You may want to feedback something more useful (to the user)
Updated UserGuide.adoc
Update instructions for running JAR file from terminal. Include Schedule and History feature instructions.
Add pictures for tags command in UG and search feature in DG
Add more test
Remove non-linked diagrams
@tran-quang-thanh @njw95 @chelsea148629 @kevin996231