Method discount finished. Not tested. Added a new table discountedTable, and added a new class DiscountedKey to represent the key of the table.