lib/order.rb
# define method to find total cost including tax
define method to find total cost including tax
define method to find total cost including tax
def total
    total = 0
    @products.each do |product, price|
      total += price
    end
    total += (total * 0.075)
    total = total.round(2)
    return total
  end
def total total = 0 @products . each do | product , price | total += price end total += ( total * 0.075 ) total = total . round ( 2 ) return total end
define method to find total cost including tax
define method to find total cost including tax
# find subtotal # calculate and add sales tax # round final total to 2 decimal places