Conclusion
We suspect that several of this lab's activities proved difficult for many of you: keeping track of what references what; modifying code (which you first have to understand); and systematically finding bugs. If this applies to you, get your partner or another classmate involved. Have him or her generate variants of the lab exercises to provide extra practice.
The exercises on complicated uses of references are fairly easy to produce and easy to check once solved. Methods for counting the deposits and withdrawals can be added to the
Account
class. And bugs in any program are generally easy to generate. (You might want to write down any particularly problematic bugs that you encounter in lab or homework! Keeping track of the bugs you yourself make and reveal what your own weaknesses as a programmer are)We'll be covering arrays and testing in the next lab.
Homework Submission
- HFJ: Chapter 5
- JRS: Arrays
- Java Style Guide
Submit the following as assignment "hw3":
- your
Account.java
andAccountTester.java
that provide overdraft protection and account merging; - your
Debug.java
program with whatever extra calls to check you added while analyzing it; - your file
bug.info
.