class Cart
  attr_reader :purchases
  attr_reader :price

  def initialize
     @purchases = []
     @price = 0.0
  end

  def add_purchase(item)
    @purchases << Purchase.create_from(item)
    @price += item.price
  end

end