import java.util.Random;
import java.util.Scanner;
public class SentenceScrambler {
public static void main(String[] args){
do{
String word = readWord();
int wordLength = scrambleWord(word);
}
while (readWord().equalsIgnoreCase("Stop"));
}
public static String readWord(){
Scanner in = new Scanner(System.in);
System.out.print("Please enter your word: ");
String word = in.next();
return word;
}
/**
* Finds the beginning of the word
* @param word
* @return
*/
public static int scrambleWord (String word){
int counter = 0;
while (counter < word.length())
{
counter++;
}
int firstChar = 0;
int lastChar = counter;
int wordLength = counter - 1;
Random rn = new Random();
int counter2 = 0;
while (counter2 < wordLength)
{
int randomNumbers = rn.nextInt(wordLength-2)+1;
counter2++;
}
}
public static void printWord(String scrambledWord)
{
System.out.print(newWord);
}}
Thanks to whoever can help me figure this out.


Sign In
Create Account

Back to top









