import structure5.*; class Example3 { /* This version correctly checks that: * * x is an integer, and * * x < MAX_VALUE so that overflow can't happen * Try giving it some bad values. You'll see that the code * fails, but in an expected way. */ public static int addOne(int x) { Assert.pre(x < Integer.MAX_VALUE, "x must be an integer less than MAX_VALUE."); int z = x + 1; Assert.post(z > x, "z must be greater than x."); return z; } public static void main(String[] args) { int x = Integer.valueOf(args[0]); System.out.println(addOne(x)); } }