/* * code for 2012 final, WB 5/12 */ import meggy.Meggy; class PA6fin { public static void main(String[] whatever){ new C().tst(); } } class C { V cMem; public void tst() { V tLoc; cMem = new V(); cMem.put(1,2); tLoc = new V(); tLoc.put(3,4); /* here */ if ( cMem.get() < tLoc.get() ) Meggy.setPixel((byte)1, (byte)1, Meggy.Color.GREEN); else Meggy.setPixel((byte)1, (byte)1, Meggy.Color.RED); } } class V { int vMem1; int vMem2; public int get(){ return vMem1+vMem2; } public void put(int v1, int v2){ vMem1=v1; vMem2=v2; } }