Class Die java.lang.Object extended by Die public class Die extends java.lang.Object Die - an n-sided die with given integer values. The given integer values are returned via nextRoll() with uniform probability., Constructor Summary Die() Creates a new Die instance with the default values: 1, 2, 3, 4, 5, 6. Die(int[] outcomes) Creates a new Die instance with the given integer outcomes. Die(int sides, int min) Creates a new Die with a given number of sides and an incremental sequence of values beginning with a given minimum value. Method Summary int nextRoll() nextRoll - return one of the die values at random. Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait Constructor Detail Die public Die(int[] outcomes) Creates a new Die instance with the given integer outcomes. Parameters: outcomes - an int[] value - an array of the integer values for each side of the die. Die public Die(int sides, int min) Creates a new Die with a given number of sides and an incremental sequence of values beginning with a given minimum value. Thus, the die is numbered min, min + 1, ... min + sides - 1. Parameters: sides - an int value - number of sides on the die min - an int value - minimum value of the incremental sequence of die values Die public Die() Creates a new Die instance with the default values: 1, 2, 3, 4, 5, 6. Method Detail nextRoll public int nextRoll() nextRoll - return one of the die values at random. Each value is equiprobable. Returns: an int value - die value rolled
Class Die
java.lang.Object
extended by Die
public class Die
extends java.lang.Object
Die - an n-sided die with given integer values. The given integer values are returned via nextRoll() with uniform probability.,
Constructor Summary
Die()
Creates a new Die instance with the default values: 1, 2, 3, 4, 5, 6.
Die(int[] outcomes)
Creates a new Die instance with the given integer outcomes.
Die(int sides, int min)
Creates a new Die with a given number of sides and an incremental sequence of values beginning with a given minimum value.
Method Summary
int nextRoll()
nextRoll - return one of the die values at random.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
Die
public Die(int[] outcomes)
Creates a new Die instance with the given integer outcomes.
Parameters:
outcomes - an int[] value - an array of the integer values for each side of the die.
Die
public Die(int sides,
int min)
Creates a new Die with a given number of sides and an incremental sequence of values beginning with a given minimum value. Thus, the die is numbered min, min + 1, ... min + sides - 1.
Parameters:
sides - an int value - number of sides on the die
min - an int value - minimum value of the incremental sequence of die values
Die
public Die()
Creates a new Die instance with the default values: 1, 2, 3, 4, 5, 6.
Method Detail
nextRoll
public int nextRoll()
nextRoll - return one of the die values at random. Each value is equiprobable.
Returns:
an int value - die value rolled
![Package Class Tree Deprecated Index Hellp
PREV CLASS NEXT CLASS
SUMMARY: NESTED | FIELDI CONSTRI METHOD
FRAMES NO FRAMES
DETAIL: FIELD |CONSTRIMETHOD
Class Die
java.lang.Object
LDie
public class Die
extends java. lang.object
Die - an n-sided die with given integer values. The given integer values are returmed via nextRoll (1 with uniform probability.,
Constructor Summary
Die()
Creates a new Die instance with the default values: 1,2, 3, 4,5,6.
Die(int[] outcomes)
Creates a new Die instance with the given integer outoomes.
Die(int aides, int min)
Creates a new Die with a given number of sides and an incremental sequence of values beginning with a given minimum value.
Method Summary
int nextRoll()
nextRol1- return one of the die values at random
Methods inherited from class java.lang.Object
clone, equals, finalize, getclass, hashCode, notify, notifyAll, tostring,, wait, wait, wait
Constructor Detail
Die
public Die (int[] outeomes)
Creates a new Die instance with the given integer outcomes.
Parameters:
outcomes an int[] value - an array of the inte ger values for cach side of the dic.
Die
public Die (int sides,
int min)
Creates a new Die with a given number of sides and an incremental sequence of values beginning with a given minimum value. Thus, the die is numbered min, min + 1,
.min + sides - 1
ParameterN:
sides - an int value - number of sides on the die
min - an int value - minimum value of the incremental sequence of die values
Die
public Die ()
Creates a new Die instance with the default values: 1, 2, 3,4,5,6.
Method Detail
next Roll
public int nextRoll()
nextRoll- return one of the die walues at randorm. Each value is equiprobable.
Returns:
an int value - die value rolled
Package Class Tree Deprecated Index Help
PREV CLASS NEXT CLASS
SUMMARY: NESTED | FIELDI CONSTRI METHOD
FRAMES NO FRAMES
DETAIL: FIELD | CONSTR I METHOD
Paint X lite](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F75449ef3-fcc1-42e7-9af4-d9c30b92c4e1%2F328390c7-95fa-4e85-b8b9-e8add28947a7%2Feemo0go_processed.png&w=3840&q=75)

Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images









