01: package org.acm.seguin.test;
02:
03: import java.io.*;
04:
05: /**
06: * This class is a test of what happens to an already acceptable file
07: *
08: *@author Chris Seguin
09: *@created January 1, 2000
10: */
11: public class Correct extends Object {
12: /**
13: * This method throws an exception or returns a string based
14: * on the boolean input
15: *
16: *@param value the boolean value that makes the choice
17: *@return a string "OK"
18: *@exception IOException thrown if value was false
19: */
20: public String makeChoice(boolean value) throws IOException {
21: if (value) {
22: return "OK";
23: } else {
24: throw new IOException("Value was not OK");
25: }
26: }
27: }
|