Matthew Bendford wrote:To add on what's already mentioned: A possible name for your calculator be RpmCalculator.
Note: It does omit the phrase "parameters" altogether. Why? Cause you want to calculate a RPM object by whatever input.
Side-note to RPM vs Rpm: There's no fixed rule and inconsistant within the SE API itself: URL is a good example: URL.openConnection returns an URLConnection. But its implementations are HttpURLConnection and JarURLConnection - although both HTTP and JAR are abreviations as URL - but only URL is kept all-capital.
There're a few others throughout the SE API all since early on 1.0 or 1.1 - so around late 80s / early 90s. We wont change them today even if someone would come up with a ruleset how to handle them.
On the other site ... well - if you call it RpmCalculator why not call it Rpm instead of all-capital RPM?
You see: This gets philosophical right away ... it comes down to personal preference. So, you maybe come up with yozr own style, you may copy someone else, but whatever way you go: stick to it! Hence: choose wisely.
Junilu Lacar wrote:...
You'll do yourself and others a huge favor if you write this kind of code instead:
A guy named John Woods once wrote "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” Keep that in mind when you start writing code that others may have to read or maintain.
Yes between my last msg and reading yours I figured out that most boolean methods can just be the word return followed by boolean math. I wrote some beauties last night or the night before.... both I guess. My favorite was the leap year problem. Mostly because it made me think.... I cut down my code several times... I'd be working on a completely different problem and something about writing the current solution would prompt me to realize I had redundant checks in my previous code. I'm enjoying the course so far. I did send in a query to the teacher to see if it's OK to use things we haven't officially been taught in our solutions (like the ternary operator, which is still a valid construct for non-boolean methods that return strings.)
Campbell Richie wrote:This (old style guide link) is what you should write:-
Estel Lopez wrote:
Campbell Ritchie wrote:Something like?