Question: How do I write the following methods for a RandGuessGAme class in java. A Class for a simple, randomized guessing game. Five integer values between
How do I write the following methods for a RandGuessGAme class in java. A Class for a simple, randomized guessing game. Five integer values between 1 and MAX_VALUE (inclusive) will be generated. Only the first and last will be shown to the player. The player must then guess if the sum of all of the numbers is greater than the possible average or not.


please write the following methods in java with the following Javadoc for this class. Thanks in advance
- toggleHidden public void toggleHidden) Toggles the value of hideMiddleVals. If it is currently true, sets it to false, and vice- versa toString public java.lang.String toString() Returns a String containing the values in the "numbers" array on a single line, separated by spaces with the middle values hidden or all visible based on value of "hideMiddleValue" data member. There is a trailing space on the end, so an example String returned may be: "5 X X X 67 ". NOTE: This does not output to System.out, it generates and returns a String Overrides: toString in class java.lang.object Returns: A String with the values of the numbers array. Middle values are hidden if hideMiddleValue is true
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
