total price for each element
This commit is contained in:
parent
8fddf65e5a
commit
9649bb157c
2 changed files with 9 additions and 4 deletions
|
|
@ -31,3 +31,7 @@ func (o *Order) Total() int {
|
|||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func (c *Cake) Total() int {
|
||||
return c.Amount * c.Price
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue