package studentDB;
public class Util {
    public static void assert (boolean condition, String message) {
        if (!condition) {
	    System.out.println ("Assertion failed: " + message);
	    System.exit(1);
	}
    }

    // Convert a string to an int
    public static int strint (String s) {
	try {
	    int i = Integer.parseInt (s);
	    return i;
	} catch (Exception e) {
	    System.out.println ("Attempt to convert "+s+" to an integer");
	    System.out.println ("Substituting -1");
	    return -1;
	}
    }
}
