package accumulate.poly2;
|
package accumulate.poly2;
|
package accumulate.poly2;
|
package accumulate.poly2;
|
Testing OO Accumulator
We should get: 119
119
What happens if we do this:
acc.incrementBy("watusi");
java.lang.ClassCastException
at accumulate.poly2.AccumulableInt.incrementBy(AccumulableInt.java:24)
at accumulate.poly2.Accumulator.incrementBy(Accumulator.java:12)
at accumulate.poly2.TestOOAccumulator.main(TestOOAccumulator.java:25)