class Study { int k, samplesize; float testvalue; String tail; // Constructor Study() { samplesize = int(random(10, 25)); testvalue = random(-6, 6); k = int(random(3)); if (k==0) { tail = "right-tailed"; } else if (k==1) { tail = "left-tailed"; } else { tail = "two-tailed"; } } }