ok, this is for my
Java class and the task in question is right out of the text book.
the goal is to write up a calculator that spits out the projected height of a kid based on the supplied gender and the heights of the two parents.
I got the actual calculations working but now I'm dealing with how to make an error code loop when dealing with a double but the user entered a
string.
here is the problem child:
now I actually ended up using another method to get this done with "try" and "catch" but using the "if (keyboard.hasNextDouble())" method seems so much simplistic if only I could get the thing to stop going into an endless loop if someone types in "dog".
is there some way to get this thing to not flip out? I have a hard time swallowing that there isn't some simple command to jump back up to the start of the loop.
if anyone wants to play with it here is the complete brick of code, even though this is for homework I don't mind spitting it out because gates A & B aren't fully working.