Objects + Tests = Magic
08_katapotter
08_katapotter
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Computing Price for b ∈ Basket<br />
b 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 />
NAIVE