Question: Java programming on netbean Hi-Lo Game (with Dice) In this homework, you will be writing a program, which repeatedly asks the user if the next
Hi-Lo Game (with Dice) In this homework, you will be writing a program, which repeatedly asks the user if the next roll will be higher or lower than the last dice roll. You will continually play until the user types quit on a line by itself. The game will remember how many times you were successful and how many times you tried and report the ratio of success to tries after the user quits. In addition, the game will maintain persistence: remembering you and how many times you've played even after exiting (by maintaining a file). You will need to ask the user for their user name prior to playing and use that to record their results in a file. If the user has played before, the number of successful tries and the number of tries is in a file named after the user with a .txt extension. If not, we start at zero for that user. Once the user quits, you'll need to save the new results into the correct file. Your dialog should be clear each time you ask for something what you are asking for and output the result. Logic reading/determining the hi/lo/quit Logic providing the dice rolls Logic providing the persistence which includes: a. Determine if the file exists b. Opening the file, reading the number correct and the number of tries (each on their own line) c. Once finished, rewriting the file so that it contains current data The logic providing the rest of the result (managing the play, keeping score, calculations) Name your program: DiceHILO.java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
