import java.util.*; public class HangmanSkeleton { public static void main(String[] args) { String[] words={"...", "...", "..."}; Random g=new Random(); String word=// get a random word int size=// get word's size boolean[] correctGuesses=new boolean[size]; // fill correctGuesses with all falses int right=0,wrong=0,num; char c; do{ while(right!=size&&wrong<7) // play the game { c=getGuess(word, correctGuesses); // get the user's latest guess num=fillIn(c,word,correctGuesses); // find out how many c's were found in word and also update correctGuesses if(num>0) { // inform the user that c is in the word and add num to right } else { // inform the user that c is not in the word and add 1 to wrong } } if(right==size) // inform the user that they won else // inform the user that they lost and output the word }while(...) } public static char getGuess(String word, boolean[] correctGuesses) { Scanner in=new Scanner(System.in); char c; String correct2=convert(word, correctGuesses); // pass word and correct on to convert to change the pattern of trues/falses to a string // output correct2 and get the user's guess, stored in c // return c } public static String convert(String word, boolean[] correctGuesses) { String temp=""; for(int i=0;i