New version of the code
Add throws Exception case Instances passed to constructor is not a
TheresholdCurve Instances