Question: JAVA: Write an interactive program which prompts the user for their name and then prints a message to the user about the length of the
JAVA: Write an interactive program which prompts the user for their name and then prints a message to the user about the length of the user's name.
The message should report that the user's name is 'short' if < 7 characters, 'medium' if 8 to 12 characters, 'long' if > 12 characters.
Example program output:
Hi, please enter your name: Dave Hi Dave. You have a short name with 4 characters.
Another example program output:
Hi, please enter your name: Daniel Day-Lewis Hi Daniel Day-Lewis. You have a long name with 16 characters.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
