Write a JAVA program that contains a class to encapsulate a word that is entered by the
Fantastic news! We've Found the answer you've been seeking!
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 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.
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date: