Creating hangman game.

Programming
Tutor: None Selected Time limit: 3 Days

hidden

This is how the output should look like. http://prntscr.com/1is9ht
Don't use arrays cuz we haven't learned that

This is my code so far

int count=1;

while (count<=24){

Scanner keyboard = new Scanner(System.in);

int length;

String originalString;

String guess;

String option= "abcdefghijklmnopqrstuvwxyz";

String questionmarks;

System.out.println("Please enter a string");

originalString=keyboard.nextLine();

length=originalString.length();

questionmarks = originalString.replaceAll(".", "?");

System.out.println("Original String: "+originalString);

System.out.println("Guessed String: "+questionmarks);

System.out.println("Characters to choose from: "+option);

System.out.println("Please guess a character");

guess=keyboard.nextLine();

if (originalString.contains(guess)){

count++;

}

else{

option.replace(guess, "_");

count++;

System.out.println(option);

}

}


Aug 1st, 2013

Hangman game.txt 
This file contains the required code 
Hope it helps :)

Aug 2nd, 2013

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
hidden
...
Aug 1st, 2013
...
Aug 1st, 2013
Mar 30th, 2017
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer