package downey.hw1; /** * Interface for required methods in Hw1 * * @author Tim Downey */ public interface Hw1Interface { /** *Read an integer from the user. It will read a line of text from the user *and attempt to format it as an integer. If there is a NumberFormatException, *then the method should return 0. * *@param promptUser This is the message that will be displayed on the screen when *the user is asked to enter an integer *@return The integer read from the user, or 0 if there is an error */ public int readInt(String promptUser); /** *Read a string from the user. It will read a line of text from the user. * *@param promptUser This is the message that will be displayed on the screen when *the user is asked to enter a string *@return The line of text entered by the user */ public String readString(String promptUser); /** *Read a double from the user. It will read a line of text from the user *and attempt to format it as a double. If there is a NumberFormatException, *then the method should return 0.0 * *@param promptUser This is the message that will be displayed on the screen when *the user is asked to enter a double *@return The double read from the user, or 0.0 if there is an error */ public double readDouble(String promptUser); /** *Displays the menu for the options that are available for this program */ public void menu(); }