/* * IOmen.java * * Created on January 12, 2003, 1:14 PM */ package project1; /** An Omen is the result given by an oracle upon being asked to investigate * something. The omens given back by different types of oracles may be * different. * * @author dickey */ public interface IOmen { /** Compare this omen with another omen to determine which is more favorable. * @param otherOmen another omen, assumed to be of the same type as this one. * @return An integer telling the result of the comparison: * returns a negative value if this omen is less favorable than the other; * returns 0 if the two omens are equally favorable; * returns a positive value if this omen is more favorable. */ public int compareTo(IOmen otherOmen); /** Explain briefly the interpretation of the omen. * @return a string with no leading or trailing whitespace. The string * should be fairly short (say, < 40 characters). * For Project 1 (for grading and debugging purposes): the string should * include enough information that given two such strings from 2 omens, a human can readily determine which omen is more favorable. * For example, for the LuckTester Omen, the brief message should * include the numeric result value. */ public String interpretBriefly(); /** Explain the interpretation of the omen. * @return a string with no leading or trailing whitespace. The string * may be of any length, but individual lines within the string * should not be longer than about 80 characters. It is perfectly * fine for this method to return the same value as interpretBriefly(), * if the full interpretation is quite short. It is perfectly fine * for this method to return the same value as toString(), if the * information is appropriate. */ public String interpretInDetail(); //end IOmen }