Question: Write a JAVA program that contains a class to encapsulate a word that is entered by the user. An appropriate accessor method should be written
Write a JAVA program that contains a class to encapsulate a word that is entered by the user. An appropriate accessor method should be written and used. Write appropriate methods to do the following:
- Convert the word to all lowercase letters.
- Scramble the word into all possible permutations and store them in a list or array.
- Sort the permutations in alphabetical order.
- Display the list of permutations.
- Report the number of permutations.
Test all constructors and methods using a separate driver class.
Step by Step Solution
3.28 Rating (148 Votes )
There are 3 Steps involved in it
Java program that encapsulates a word performs various operations on it and displays the results imp... View full answer
Get step-by-step solutions from verified subject matter experts
