Hi, I am having a little trouble understanding why I am not getting this right, I followed all the steps in the book and it still came out wrong, help please!
Write a method called diceSum that accepts a Scanner for the console as a parameter and prompts for a desired sum, then repeatedly simulates the rolling of 2 six-sided dice until their sum is the desired sum. Here is a sample dialogue with the user:
That sounds like Programming By Accident. Not a particularly effective approach.
It's okay to guess sometimes, but if you do, make sure you at least have some expectation of what each piece means and why it might work.
So, for instance, when you write
don't just do it because you're sticking arbitrary symbols together. If you have a theory as to what each piece of that line might mean, and why you might need it, then sure, try it out, see if your theory holds up. But just reaching into the blind grab bag and throwing together whatever happens to come out--an - sign here, some parentheses there--is something to be avoided always.
Joined: Oct 22, 2012
Thanks to all for your help, I have figured out my problem (I also figured out that this is not something I should be doing on little to no sleep lol).
Once again thank you. If I have problems in the future I will be sure to ask.