Applying It |
Try to complete the following exercises by yourself.
Independent Exercise 1
Extend the methods Withdraw and Transfer of the Person/Account example presented previously to include verification of overdraft (to make sure that there is enough money before making a withdrawal—that the balance after withdrawal is always ≤ 0).
Independent Exercise 2
Modify the balance property of the Person class to deal with the case when an invalid account ID is provided in a better fashion (i.e., detect the error and warn the user).
Get Visual Basic® .NET by Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.