public void credit(Double creditAmount){
  if (Double.compare(creditAmount,0.0d) > 0 && Double.compare(creditAmount,1000000) < 0) {
    apply(new AccountCreditedEvent(this.accountNo,creditAmount,this.balance));
  }
 else {
    throw new IllegalArgumentException("Cannot credit with the amount");
  }
}

public void credit ( Double creditAmount ) { if ( Double . compare ( creditAmount , 0.0d ) > 0 && Double . compare ( creditAmount , 1000000 ) < 0 ) { apply ( new AccountCreditedEvent ( this . accountNo , creditAmount , this . balance ) ) ; } else { throw new IllegalArgumentException ( "Cannot credit with the amount" ) ; } }
business logic : cannot credit with a negative amount cannot credit with more than a million amount ( you laundering money ? )
