int computeChange(int dueCents, int tenderedCents) { final rest = tenderedCents - dueCents; return rest < 0 ? 0 : rest; }