Question: In small talk please! Class-side methods: 1) new: dice This method should create a new CragRoll object and assign the parameter dice to instance variable
In small talk please!

Class-side methods: 1) new: dice This method should create a new CragRoll object and assign the parameter dice to instance variable roll. Don't forget to actually define this instance variable in your CragRoll class! 2) surprise This method should randomly generate three integer values between 1 and 6 , representing a roll of three dice, and place them in an array. It should then create a new CragRoll object, assign that array to the instance variable roll, and return the CragRoll object. Hint \#1: Check out the methods in the Random class... Hint \#2: This method can call the new: method above after generating the dice roll... Instance-side methods: 3) setRoll: dice This method should assign the parameter dice to an instance variable called roll. 4) getRoll This method simply returns the instance variable roll. 5) iscrag If the dice represent a Crag, return true. Return false otherwise. 6) isThirteen Return true if the dice total 13, false otherwise. 7) is Three0fAKind Return true if the dice are three of a kind, false otherwise. 8) isstraight This method should return true if the dice roll contains any of the four straights (low, high, even, odd) described in rules of Crag, and false otherwise. 9) category This method determines the category of the roll (Low Straight, Odd Straight, Crag, Thirteen, etc.) and returns it as a String. 10) score This method determines the overall score of the roll. The return type should be an integer, whose value is simply the score
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
