Page 1 of 1

About Question enthuware.ocpjp.v8.2.1866 :

Posted: Sun Jun 19, 2016 9:08 am
by hordine
If your only goal is to make the code compile you can do either one:
- Remove code at //2
or
- Change //3 to: Function<Integer, Integer> f = x->x+(int)(x*rate);

No need to do both.

When you do both you're changing the logic. If rate equals 0, for instance, you'd be multiplying payment by 0 and not by 0.1 like before.

Re: About Question enthuware.ocpjp.v8.2.1866 :

Posted: Sun Jun 19, 2016 9:59 am
by admin
That is why the problem statement says, "... when applied independent of each other ....".

HTH,
Paul.

Re: About Question enthuware.ocpjp.v8.2.1866 :

Posted: Sun Jun 19, 2016 1:44 pm
by hordine
I see, ok, yes. There's nothing wrong with it then. You can delete my question if you like.