Write a java interface for a customer that
requires billing. Some clients are billed monthly,
others are billed weekly, finally others are billed every other
week (i.e., bi-weekly).
You need to set the week number (0,1,2, or 3). Then you
invoke the bill() method on _all_ the instances of customers.
Those that are active will print:
"CustomerName needs a bill".
Make 3 customer classes that implement the Billable interface.
Then make a collection of instances of customer class (4 of
each type)
and set the week numbr for each of them in a loop, while
invoking the bill() method.
We will discuss this home work further in class...
Regards,
- DL
|