I really like this, and I think others will too. Please be judicious with feature requests - so far the simplicity and ease of use is what I like most about it!
If anything, I would go in the opposite direction. There's no need to use parameterized variables at all. Just write out the message 3 times:
private String generateGuessSentence(char candidate, int count) {
if (count === 0) {
return "There are no " + candidate + "s";
} else if (count === 1) {
return "There is 1 " + candidate;
} else {
return "There are " + count + " " + candidate + "s";
}
}
Maybe this isn't "clean" (I'd claim it is) but it's certainly the easiest to understand.Yeah, for a Toyota that's owned by an expert car mechanic, who's hobby is doing full engine rebuilds every Tuesday.
Our BMW was a write-off after 12 years.
In the US the poor are the ones who suffer from obesity. From having too many calories available cheaply. Let that sink in. The US is so much further from "needs not being met" than anyone understands.
https://pubmed.ncbi.nlm.nih.gov/20720258/https://pubmed.ncbi.nlm.nih.gov/14684391/https://pmc.ncbi.nlm.nih.gov/articles/PMC4254327/