Skip to content

Commit

Permalink
File added
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurwrls committed Dec 2, 2022
1 parent b80efb0 commit 6776303
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

class Order {
var items = [""]
var subtotal = 0.0
var tip = 0.0
var total = 0.0

init(items: [String], subtotal: Double, tip: Double, total: Double) {
self.items = items
self.subtotal = subtotal
self.tip = tip
self.total = total
}
}

var order1 = Order(items: ["Chili Fries", "Lemonade"], subtotal: 8.75, tip: 2.0, total: 12.75)


var order8 = order1
order8.total = 0.0

print(order1.total)
print(order8.total)

0 comments on commit 6776303

Please sign in to comment.