-
Notifications
You must be signed in to change notification settings - Fork 1
Find People #2
Find People #2
Conversation
Might add test cases in Google Drive, as mentioned in milestone 2 assignment on canvas? |
results.append("Search Result(s):"); | ||
|
||
if (resultList ==null) { | ||
results.append("\nNot found."); |
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.
might want to reply and return
here? when i enter an impossible input e.g. 123
, it will give reply:
Search Result(s):
Not found. Too many results...
replyToken, | ||
reply | ||
); | ||
number=1; // get input and search for name |
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.
might want to use a final variable to many it more understandable for later development?
e.g. number = PEOPLE_ITSC_INPUT
?
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.
Since other branches also use similar mechanism, will ignore this suggestion first and solve at once later
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.
Suggestions
- Reply rather than just append when no results to prevent unexpected reply in later statements
- use constant to represent later stage of reply
SearchPeople(string) in URLConnectionReader class takes in a string and returns a list of people found. People and PeopleList classes store the information of found people.
3 Cases:
Found
Not found
Too many results