Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started