ch15/474/Basket.cc
// use discounted price for up to a specified number of items
// additional items priced at normal, undiscounted price
use discounted price for up to a specified number of items
additional items priced at normal, undiscounted price
use discounted price for up to a specified number of items additional items priced at normal undiscounted price
double Lim_item::net_price(size_t cnt) const
{
    size_t discounted = min(cnt, max_qty);
    size_t undiscounted = cnt - discounted;
    return discounted * (1 - discount) * price 
           + undiscounted * price;
}
double Lim_item :: net_price ( size_t cnt ) const { size_t discounted = min ( cnt , max_qty ) ; size_t undiscounted = cnt - discounted ; return discounted * ( 1 - discount ) * price + undiscounted * price ; }
use discounted price for up to a specified number of items
additional items priced at normal, undiscounted price
use discounted price for up to a specified number of items additional items priced at normal undiscounted price