Money.fromDollars constructor
Implementation
factory Money.fromDollars(int dollars, int cents)
{
if (cents > MAX_CENTS) {
throw new IllegalArgumentException("Cents value greater than MAX_CENTS.");
}
return new Money(dollars * 100 + cents);
}