Question: If the parameter to the makePayment method of the CreditCard class (see Code Fragment 1.5) were a negative number, that would have the effect of
If the parameter to the makePayment method of the CreditCard class (see Code Fragment 1.5) were a negative number, that would have the effect of raising the balance on the account. Revise the implementation so that it throws an IllegalArgumentException if a negative amount is sent as a parameter.
Step by Step Solution
3.44 Rating (170 Votes )
There are 3 Steps involved in it
public void makePaymentdoub... View full answer
Get step-by-step solutions from verified subject matter experts
