-
-
Notifications
You must be signed in to change notification settings - Fork 690
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update exercises/practice/bob/.approaches/method-based/content.md
Co-authored-by: Kah Goh <[email protected]>
- Loading branch information
1 parent
498ae46
commit ff35ee4
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ In this approach, the different conditions for Bob’s responses are separated i | |
|
||
This approach simplifies the main method `hey` by breaking down each response condition into helper methods: | ||
|
||
1. **Trimming the Input**: | ||
### Trimming the Input | ||
Check failure on line 44 in exercises/practice/bob/.approaches/method-based/content.md
|
||
The `input` is trimmed using the `String` [`trim()`][trim] method to remove any leading or trailing whitespace. This helps to accurately detect if the input is empty and should prompt a `"Fine. Be that way!"` response. | ||
|
||
2. **Delegating to Helper Methods**: | ||
Check failure on line 47 in exercises/practice/bob/.approaches/method-based/content.md
|
||
|