12.12.2016 Views

Objects + Tests = Magic

08_katapotter

08_katapotter

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

is empty => 0.0<br />

Let discounts = {d ∈ Discount | d can be applied to b}<br />

discounts is empty => |books|b * PRICE<br />

Let candidates = { p ∈ R | d ∈ discounts, p = compute(b,d) }<br />

=> min(candidates)<br />

Let local price = d applied to b<br />

Let remaining = clone of b without the books used in d<br />

=> local price + compute(remaining)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!