Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions