Refactoring exercise using the Extract Variable refactoring for the Upcase Refactoring Trail.
Put the result of the expression, or parts of the expression, in a temporary variable with a name that explains the purpose. -- Martin Fowler
deftotalamount + (amount * TAX) - (amount * (discount_percentage / 100.0)) + (amount * (tip_percentage / 100.0))enddeftotaltax=amount * TAXdiscount=amount * (discount_percentage / 100.0)tip=amount * (tip_percentage / 100.0)amount + tax - discount + tipend