Design and implement a word unscrambler game in Java.
Instructions
Your program...
![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 04.03.2020 02:01 1lowz1k
Design and implement a word unscrambler game in Java.
Instructions
Your program should read in a random word from a file called words. txt (note the lack of capitalization) that you provide. The file should contain:
One word per line
At least 10 different words
Each word should have at least 5 letters
Words should have variable lengths
To read a random word you can generate a random number between 1 and the number of lines, and skip n-1 lines before reading the word. Scramble the word by swapping random pairs of letters a random number of times (mandatory use of a loop). Display the scrambled word with character indices on top. Offer the user a menu with the following choices:
Enter 1 to swap a pair of letters
If this option is selected, prompt the user to enter two indices and swap the letters. A space should separate the two indices. Print an error message if the indices are invalid. If the word is unscrambled successfully, print a congratulatory message containing the word and the number of steps it took to unscramble. Otherwise, display the new word and offer the menu again.
Enter 2 to solve
If this option is selected, print the unscrambled word and quit.
Enter 3 to quit
If this option is selected, quit.
![ansver](/tpl/images/cats/User.png)
Answers: 2
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 20:30
Column a of irma’s spreadsheet contains titles for each row, but her document is too big and will be printed three pages across. she wants to be sure that every page will be understood. what can irma do to with this problem?
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 22:30
Apart from confidential information, what other information does nda to outline? ndas not only outline confidential information, but they also enable you to outline .
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 23:30
What are "open-loop" and "closed-loop" systems
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 00:40
What is the error in the following pseudocode? module main() call raisetopower(2, 1.5) end module module raisetopower(real value, integer power) declare real result set result = value^power display result end module
Answers: 1
You know the right answer?
Questions
![question](/tpl/images/cats/biologiya.png)
Biology, 17.07.2019 18:00
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 17.07.2019 18:00
![question](/tpl/images/cats/istoriya.png)
History, 17.07.2019 18:00
![question](/tpl/images/cats/mat.png)
Mathematics, 17.07.2019 18:00
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 17.07.2019 18:00
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/en.png)
English, 17.07.2019 18:00
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/en.png)
English, 17.07.2019 18:00
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/health.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 17.07.2019 18:00
![question](/tpl/images/cats/en.png)
English, 17.07.2019 18:00
![question](/tpl/images/cats/mat.png)
Mathematics, 17.07.2019 18:00
![question](/tpl/images/cats/mat.png)
Mathematics, 17.07.2019 18:00
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/en.png)
English, 17.07.2019 18:00
![question](/tpl/images/cats/ekonomika.png)