This week's book giveaway is in the Other Open Source APIs forum. We're giving away four copies of Storm Applied and have Sean Allen, Peter Pathirana & Matthew Jankowski on-line! See this thread for details.
Those are not your real compiler errors; I don't get the first one about String and double when I try your code.
As for the second one, switch statements can only accept int and smaller (byte, short and char). long, float and double are not allowed. Also, you entire switch structure is illegal. Switch statements only work on exact values. For example:
You'll need to switch to an if-statement: