// // Supporting material for lecture 14 // public class MyMath { public static int max(int i,int j){ if (i > j) return i; else return j; } public static int abs(int i){ if (i>=0) return i; else return -i; } public static int diff(int i,int j){return abs(i-j);} } // // NOTES: // - no constructor! // - methods are static // - methods accessed by MyMath.methodName(...) // // Write methods // public static int manhattanDistance(int x1,int y1,int x2,int y2) // public static float euclideanDistance(int x1,int y1,int x2,int y2) // // Is this odd? // - look at api for Math