src/secretwriting/MonoalphabeticCipher.java
public void testRandom() {
		List<Character> modifiableCollection = new ArrayList<Character>(Arrays.asList(AlphabeticalStatistics.ALL_LETTERS));
		for (int i = 0; i < this.getWords().length; i++) {
			String w = this.getWords()[i];
			if (AlphabeticalStatistics.needsOneLetter(w)) {
				char oldChar = w.charAt(getIndexOfFirstLowerCase(w));
				if (!solvedLetters.contains(oldChar)) {	
					for (int j = 0; j < modifiableCollection.size(); j++) { // Loop through letters of alphabet
						Character letterOfAlphabet = modifiableCollection.get(j);
						if (replaceLetters(oldChar, letterOfAlphabet)) {
							modifiableCollection.remove(letterOfAlphabet);		
							System.out.println(oldChar + " was replaced with " + letterOfAlphabet.toString());
							break;
						}
					}
					
				}
			}
		}
	}
/**
	 * Find the words that require one (uppercase) letter to be solved
	 * Loop through the alphabet backwards until replacing the uppercase letter with the current alphabet creates an English word in the WordNet library
	 * Validate replacing the old char with the new one
	 * If valid, replace the letter and print the replacement
	 * Replace again if necessary
	 * End the for loop and move on to the next word, if there is one
	 */
Find the words that require one (uppercase) letter to be solved
Loop through the alphabet backwards until replacing the uppercase letter with the current alphabet creates an English word in the WordNet library
Validate replacing the old char with the new one
If valid, replace the letter and print the replacement
Replace again if necessary
End the for loop and move on to the next word, if there is one
Find the words that require one ( uppercase ) letter to be solved Loop through the alphabet backwards until replacing the uppercase letter with the current alphabet creates an English word in the WordNet library Validate replacing the old char with the new one If valid replace the letter and print the replacement Replace again if necessary End the for loop and move on to the next word if there is one
public void testRandom() {
		List<Character> modifiableCollection = new ArrayList<Character>(Arrays.asList(AlphabeticalStatistics.ALL_LETTERS));
		for (int i = 0; i < this.getWords().length; i++) {
			String w = this.getWords()[i];
			if (AlphabeticalStatistics.needsOneLetter(w)) {
				char oldChar = w.charAt(getIndexOfFirstLowerCase(w));
				if (!solvedLetters.contains(oldChar)) {	
					for (int j = 0; j < modifiableCollection.size(); j++) { 
						Character letterOfAlphabet = modifiableCollection.get(j);
						if (replaceLetters(oldChar, letterOfAlphabet)) {
							modifiableCollection.remove(letterOfAlphabet);		
							System.out.println(oldChar + " was replaced with " + letterOfAlphabet.toString());
							break;
						}
					}
				}
			}
		}
	}
public void testRandom ( ) { List < Character > modifiableCollection = new ArrayList < Character > ( Arrays . asList ( AlphabeticalStatistics . ALL_LETTERS ) ) ; for ( int i = 0 ; i < this . getWords ( ) . length ; i ++ ) { String w = this . getWords ( ) [ i ] ; if ( AlphabeticalStatistics . needsOneLetter ( w ) ) { char oldChar = w . charAt ( getIndexOfFirstLowerCase ( w ) ) ; if ( ! solvedLetters . contains ( oldChar ) ) { for ( int j = 0 ; j < modifiableCollection . size ( ) ; j ++ ) { Character letterOfAlphabet = modifiableCollection . get ( j ) ; if ( replaceLetters ( oldChar , letterOfAlphabet ) ) { modifiableCollection . remove ( letterOfAlphabet ) ; System . out . println ( oldChar + " was replaced with " + letterOfAlphabet . toString ( ) ) ; break ; } } } } } }
Find the words that require one (uppercase) letter to be solved
 Loop through the alphabet backwards until replacing the uppercase letter with the current alphabet creates an English word in the WordNet library
 Validate replacing the old char with the new one
 If valid, replace the letter and print the replacement
 Replace again if necessary
 End the for loop and move on to the next word, if there is one
Find the words that require one ( uppercase ) letter to be solved Loop through the alphabet backwards until replacing the uppercase letter with the current alphabet creates an English word in the WordNet library Validate replacing the old char with the new one If valid replace the letter and print the replacement Replace again if necessary End the for loop and move on to the next word if there is one
// Loop through letters of alphabet