How To Calculate Discounts In Java