We’re rewarding the question askers & reputations are being recalculated! Read more.
3 deleted 261 characters in body
source | link

I don't see any need for those input functions in getInput() to take hard-coded strings as arguments. You could simply pass them to println() from within each function. Only have functions take arguments if they need something from the calling code.

I'm not sure if you need all of that in yes_no(). The top answer to the commented question gives something a bit shorter (also no OUTER), and another states that you can just return true if the user inputs 'y', otherwise return false. I'd probably go with the latter, unless you really insist on getting valid feedback from the user.

I don't see any need for those input functions in getInput() to take hard-coded strings as arguments. You could simply pass them to println() from within each function. Only have functions take arguments if they need something from the calling code.

I'm not sure if you need all of that in yes_no(). The top answer to the commented question gives something a bit shorter (also no OUTER), and another states that you can just return true if the user inputs 'y', otherwise return false. I'd probably go with the latter, unless you really insist on getting valid feedback from the user.

I'm not sure if you need all of that in yes_no(). The top answer to the commented question gives something a bit shorter (also no OUTER), and another states that you can just return true if the user inputs 'y', otherwise return false. I'd probably go with the latter, unless you really insist on getting valid feedback from the user.

2 added 17 characters in body
source | link

I don't see any need for those input functions in getInput() to take hard-coded strings as arguments. You could simply displaypass them to println() from within the functionseach function. Only have functions take arguments if they need something from the calling code.

I'm not sure if you need all of that in yes_no(). The top answer to the commented question gives something a bit shorter (also no OUTER), and another states that you can just return true if the user inputs 'y', otherwise return false. I'd probably go with the latter, unless you really insist on getting valid feedback from the user.

I don't see any need for those input functions in getInput() to take hard-coded strings as arguments. You could simply display them within the functions. Only have functions take arguments if they need something from the calling code.

I'm not sure if you need all of that in yes_no(). The top answer to the commented question gives something a bit shorter (also no OUTER), and another states that you can just return true if the user inputs 'y', otherwise return false. I'd probably go with the latter, unless you really insist on getting valid feedback from the user.

I don't see any need for those input functions in getInput() to take hard-coded strings as arguments. You could simply pass them to println() from within each function. Only have functions take arguments if they need something from the calling code.

I'm not sure if you need all of that in yes_no(). The top answer to the commented question gives something a bit shorter (also no OUTER), and another states that you can just return true if the user inputs 'y', otherwise return false. I'd probably go with the latter, unless you really insist on getting valid feedback from the user.

1
source | link

I don't see any need for those input functions in getInput() to take hard-coded strings as arguments. You could simply display them within the functions. Only have functions take arguments if they need something from the calling code.

I'm not sure if you need all of that in yes_no(). The top answer to the commented question gives something a bit shorter (also no OUTER), and another states that you can just return true if the user inputs 'y', otherwise return false. I'd probably go with the latter, unless you really insist on getting valid feedback from the user.