java programming

1.Analyze the given program (will provide)
The above program takes input from a user (considered to be a student) and asked them to rate on a scale of 1 to 5 the quality of food in the students cafetaria, with 1 being “awful” and 5 being “excellent”. After student enters -1 to end the input the given program places all the responses in a file called “numbers.txt.
Your task is to create a Tester class which reads the student responses from the “numbers.txt” file by using Scanner. Use method nextInt to input one integer at a time from the provided file. The program should continue to read responses until it reaches the end of file. The results should be output to the text file “output.txt”. You can use the Formatter class to create the output.txt file.

2.Write a program for hangman game that randomly picks a word from a text file named hangman.txt (you can create the file and save 10 words to start with) and prompts the user to guess one letter at a time, as shown in the sample run.
Each letter in the word is displayed as an asterisk. When the user makes a correct guess, the actual letter is then displayed.
When the user finishes a word, the following steps should happen
Display the number of misses to the user.
Ask the user to give you a new word, then add that word to your file hangman.txt. (Optional if you want to check for the duplicate words in the file)
Ask the user whether to continue to play.
If the user missed the same letter more than one time give extra hint to the player like “You’ve already tried this letter, try another letter”. Don’t count twice the same letter which is missed by the user.
Have minimum 10 words of your choice in the file hangman.txt.

Last Completed Projects

topic title academic level Writer delivered