temp >= 80: swimming 60 <= temp < 80: tennis 40 <= temp < 60: golf temp < 40: skiingBe sure that your conditions are no more complicated than necessary.
int temp; System.out.println("What's the temperature today?"); temp = Keyboard.readInt(); if (temp >= 80) System.out.println("How about a dip in the pool?"); _________________________________ System.out.println("Go grab a racquet!"); __________________________________ System.out.println("It's a perfect day for golf."); __________________________________ System.out.println("Let's hit the slopes!");
temp
is extreme as
determined by the extremeTemp variable. Don't worry about what to do if the
temperature is not extreme.