Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C - 2 . 2 8 The PredatoryCreditCard class of Section 2 . 4 . 1 provides a process _ month method that models the
C The PredatoryCreditCard class of Section provides a processmonth method that models the completion of a monthly cycle. Modify the class so that once a customer has made ten calls to charge in the current month, each additional call to that function results in an additional $ surcharge.
C Modify the PredatoryCreditCard class from Section so that a customer is assigned a minimum monthly payment, as a percentage of the balance, and so that a late fee is assessed if the customer does not subsequently pay that minimum amount before the next monthly cycle.
C At the close of Section we suggest a model in which the CreditCard class supports a nonpublic method, setbalanceb that could be used by subclasses to affect a change to the balance, without directly accessing the balance data member. Implement such a model, revising both the CreditCard and PredatoryCreditCard classes accordingly.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started