deposit

fun deposit(id: Int, amount: Bank.Amount): Boolean
fun deposit(id: Int, amount: Int): Boolean

Deposits an item with the provided id and amount.

Return

true if the item was deposited, does not determine if amount was matched; otherwise false

Parameters

id

the id of the item

amount

the amount to deposit

fun deposit(name: String, amount: Bank.Amount): Boolean
fun deposit(name: String, amount: Int): Boolean

Deposits an item with the provided name and amount.

Return

true if the item was deposited, does not determine if amount was matched; otherwise false

Parameters

name

the name of the item

amount

the amount to deposit