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.