public class UrnModel extends Object implements Serializable
Constructor and Description |
---|
UrnModel(int n)
create urn model
|
Modifier and Type | Method and Description |
---|---|
int |
drawDontPutBack()
draw a number without putting back
|
int |
drawPutBack()
draws a number with putting back
|
void |
reset()
refill urn
|
public UrnModel(int n)
n
- capacity (corresponding to numbers 0..n-1)public int drawDontPutBack()
public void reset()
public int drawPutBack()
Copyright © 2015–2021 Fiji. All rights reserved.