Added calculation of discounted price based on formula given in class.