public class RandomStudentFilter extends Object implements StudentFilter
| Constructor and Description |
|---|
RandomStudentFilter(double prob)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Student student)
A student is accepted with the given probability
|
String |
getName()
Filter name
|
void |
setProbability(double prob)
Set acceptance probability.
|
public RandomStudentFilter(double prob)
prob - probability of acceptance of a studentpublic boolean accept(Student student)
accept in interface StudentFilterstudent - a studentpublic void setProbability(double prob)
prob - new acceptance probabilitypublic String getName()
StudentFiltergetName in interface StudentFilter