Implementation of classes that calculate the discount.