Share
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 439045-ThreeLetterAcronym.java as ThreeLetterAcronym.java first. After that you can compile and run it as follows.

javac ThreeLetterAcronym.java
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 ThreeLetterAcronym.java is also pasted below (Please follow the code in attachment only, ...

Solution Summary

Well commented, easy to understand program with sample session.

$2.19