Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help. I do not even know where to begin with this. Write a program that prompts the user to enter three words on

I need help. I do not even know where to begin with this.

Write a program that prompts the user to enter three words on a single line (of the Java console). Once the program has read in each word separately, it should output a number of statistics about the words. Sample input/output is shown below; your output should look exactly the same (bold text is user input).

HINT: The user should input the three words in one entry (e.g., typing two words and hitting enter). You can call the scanners next() method twice (back-to-back) to save each word in its own variable.

Please enter three words (on a single line) and hit enter:

I love programming

The word 'I' is 1 character(s) long. The word 'love' is 4 character(s) long. The word 'programming' is 11 character(s) long.

The shortest word is 1 character(s) long.

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions