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:

  1. Convert the word to all lowercase letters.
  2. Scramble the word into all possible permutations and store them in a list or array.
  3. Sort the permutations in alphabetical order.
  4. Display the list of permutations.
  5. 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

1 Expert Approved Answer
Step: 1 Unlock

Java program that encapsulates a word performs various operations on it and displays the results imp... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!