Hanwei Z.

asked • 06/07/20

I need to have a functional code that can do the following requirements. My game is hangman. My question is that I don't what to start.

I need a functional program that has all the requirements:


Final Programming Assignment.


For the selected game, my program must provide the following features:

• Player vs Computer format.

• A game must consist of multiple (max 10) rounds of play.

• The result of each round must be displayed to the player.

• A player must be able to end the game they are playing at any time.

• When a game ends the game stats of each player should be shown and the winner of game should be declared.

• At the end of the game, the player must be able to start a new game or stop playing.


My program should implement:

• At least one command method and one query method.

• At least one array (example: tracking player/computer scores)

• At least one file (example: high scores, won/lost record)

• Data validation

• Selection and repetition structures


My game is Hangman.



My rules of Hangman:

– Computer makes a secret code that is already produced in a file

– User guesses a letter to find the secret code. Cannot guess the full word.

– Player wins a point if he guesses the correct word.

– Have 10 guess to determine the secret word

- If the user did not guess the whole secret word, then the computer wins a point.


P.S: I cannot use classes to program this. For the methods, I am only allow to use public not private. I am only using Dr. Java to code.


1 Expert Answer

By:

Robert K. answered • 06/07/20

Tutor
5 (15)

Computer Science Master's Student

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.