public class Amount{

 private int cents;
//@ invariant cents < 100 && cents > -100;
 private int dollars;
//@ requires cents < 100 && cents > -100;
 public Amount(int dollars, int cents){
   this.dollars = dollars;
   this.cents = cents;
 }
//@ ensures \result != null;
 public Amount negate(){
   return new Amount(-this.dollars, -this.cents);
 }
 //@ requires a != null;
 public Amount subtract(Amount a){
   return this.add(a.negate());
 }
//@ requires a != null;
 public Amount add(Amount a){
   int new_dollars = dollars + a.dollars;
   int new_cents = cents + a.cents;
   if (new_cents < -100) {
      new_cents = new_cents + 100;
      new_dollars = new_dollars - 1;
      return new Amount(new_dollars,new_cents);
   }
   if (new_cents > 100) {
      new_cents = new_cents - 100;
      new_dollars = new_dollars - 1;
      return new Amount(new_dollars,new_cents);
   }
   if (new_cents < 0 && new_dollars > 0) {
       new_cents = new_cents + 100;
       new_dollars = new_dollars - 1;
       return new Amount(new_dollars,new_cents);
   }
   if (new_cents >= 0 && new_dollars <= 0) {
       new_cents = new_cents - 100;
       new_dollars = new_dollars + 1;
       return new Amount(new_dollars,new_cents);
   }
 }

 public boolean equal(Amount a) {
   if (a==null) return false;
   else return (dollars == a.dollars && cents == a.cents);
 }

}

@@ -716,32 +716,37 @@
 cents);%0A   %7D%0A   
+else 
 if (new_cents %3E 
@@ -748,24 +748,24 @@
 ts %3E 100) %7B%0A
-
       new_ce
@@ -872,32 +872,37 @@
 cents);%0A   %7D%0A   
+else 
 if (new_cents %3C 
@@ -1052,24 +1052,29 @@
 s);%0A   %7D%0A   
+else 
 if (new_cent
@@ -1076,17 +1076,16 @@
 _cents %3E
-=
  0 && ne
@@ -1095,17 +1095,16 @@
 ollars %3C
-=
  0) %7B%0A  

Correct logical error in if condition