Explore BrainMass

Three Letter Acronym

Write a Java program that allows a user to enter three words, and displays the appropriate three-letter acronym (constructed from the input) in all uppercase letters. If user enters more than three words, ignore the extra words.

Solution Preview

Please rename attached as first. After that you can compile and run it as follows.

java ThreeLetterAcronym

A sample execution session would look like following.

[CommandPrompt] java ThreeLetterAcronym
Input three words to compute the Acronym.
Extra words will be ignored.
hello World there
Acronym is: HWT

Java code in file is also pasted below (Please follow the code in attachment only, ...

Solution Summary

Well commented, easy to understand program with sample session.