Question: Write a program named StringCompare.java which will prompt the user for three Strings, his/her favorite color, favorite fruit and favorite flower. If either of the
Write a program named StringCompare.java which will prompt the user for three Strings, his/her favorite color, favorite fruit and favorite flower. If either of the values entered for color or fruit is 'orange, convert both color and fruit to UPPERCASE. If either of the values entered (for color or flower) is violet, convert both values for color and fruit to "vloLeT" (alternating lower and upper case letters). Then print each value on it's own line: color, then fruit, then flower Sample VO (user input in italics): Enter your favorite color, fruit and flower: pink orange rose PINK ORANGE rose Another example: Enter your favorite color, fruit and flower: violet apple carnation oLeT apple oLeT
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
