[W5.11][F09-2]Pham Quang Minh#178
Open
px1099 wants to merge 7 commits into
Open
Conversation
px1099
commented
Sep 13, 2018
- CommandResult.java: encapsulate member "feedbackToUser"
- Make "find" command case-insensitive (updated User Guide & Expected Test Results)
CommandResult.java: encapsulate "feedbackToUser"
… tests on Windows & Mac
…arg in "prepareFind" in Parser.java => adding lowercase keywords in "FindCommand" in FindCommand.java FindCommandTest.java: change to include correct test result for case insensitive
|
Nice feature to have as it enhances the user friendliness of the address book. |
…to the "Changes from level 1" section
…harater encoding of manual input vs automated input
stephlewyh
reviewed
Sep 16, 2018
|
|
||
| /** The feedback message to be shown to the user. Contains a description of the execution result */ | ||
| public String getFeedbackToUser() { | ||
| return feedbackToUser; |
There was a problem hiding this comment.
If you assign feedbackToUser as private class attribute, then you will need to have a separate getter function to get the value of feedbackToUser. e.g.
string feedback = getFeedBackToUser();
return feedback;
Author
There was a problem hiding this comment.
Can you phrase the problem in another way?
I think I did create a public getter, but I did choose not to create a setter as I found no other usage of feedbackToUser other than getting it in some Command functions.
Should I always create a pair of setter and getter when encapsulating data?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.