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: