1) When the user enters a number that is not between 1 and 100, it will give an error message and not count that guess in the number of tries to guess the correct number, and they can enter a valid number after the error message is displayed.
2) After the game is over, the user should have the option to play again. It should say something along the lines of "Play again? (Y or N)" and if the user answers with 'Y', the game should restart and if the user answers with a 'N', the loop should end.
3) If the user chooses to replay the game, the guess counter should reset back to 0.
The best way to analyze these situations is to get all stipulations that need to be satisfied..
1) If the number is not in between 1-100 you want the following to happen:
Create an if statement to see if the entered number is within the range of accepted numbers, if it is not then display a message and continue on with the loop
If this occurs after tries is incremented you want to decrement tries.
2) After the do while loop is satisfied, then you need to satisfy two events,
either the user will choose to play again or decline..
Create a variable to store their answer
Prompt them to select 'y' or 'n' and then do another if statement that satisfies their answer.
You also might want to set up a delay for this message or a alert box so the user has time to read the message before they are asked to play again. Might get you some extra credit when you do some simple little tweaks the professor doesn't ask for or request.. Should only take a few minutes of research to do..
3)Set the tries counter to 0. Simple enough. Re-Set the value to 0.
Also, you might want to initialize your variables that are before your do-loop, it's good programming practice.
One more thing you might want to think about making your do while loop a method. Or wrap it like fou-lu said...
Hope this helps, if you have any other questions please ask.
As Fou-Lu stated, we won't do your work! But were always happy to provide you with the stepping stones to get there! Good luck