In this scenario, Account gets refused if there are
insufficient funds and by extension, anything calling
account.withdraw will as well...
That is because Account is the prototype for the class-like structure I have
created with Lua.
A further twist below: I can as well keep the features of the prototype but
add another feature that will act on the one instance. Account 2 has a withdrawl
limit. Even with sufficient funds, it will be refused if over the limit.
No comments:
Post a Comment