Due date: Thursday, April 1, when labs close.
memo.txt
Shape.java, Line.java, Rectangle.java, HLine.java,
VLine.java, Frame.java, Box.java
SavingsAccount.java
Screen.java
Testing is an important part of the software development process. So everything you write must be tested and you must write about your testing in your memo, even if the exercise does not explicitly ask for it.
Start with the code in www.cs.umb.edu/joi/latest-joi-cd/joi/5/shapes/, www.cs.umb.edu/~eb/110/hw4/solution/Frame.java and www.cs.umb.edu/joi/latest-joi-cd/joi/3/shapes/Box.java. You will have to write your own Rectangle.java. You won't have to look at Screen.java but you will have to have it to compile. You can ignore ShapeOnScreen.java - it's there only for Exercise 5-7, which is optional.
Be sure to make these changes in small steps:
while there is more work to do move a little bit of code (perhaps one field or method) compile test to see that behavior hasn't changedIf you try to speed things up by doing a lot at once you will surely spend much more time in the long run.
Hard code the interest rate at 5% and the fee per transaction when there are more than three transactions in a month at $1. Do not try to get these values from the Bank (as the Exercise suggests you should.)
From: Ethan BolkerSubject: ex. 5-20 Date: Wed, 31 Mar 2004 20:04:18 -0500 (EST) > From: a classmate > To: eb@cs.umb.edu > Subject: ex. 5-20 > Date: Wed, 31 Mar 2004 17:38:46 -0500 > > should we make a getter for SavingsAccount's field that stores the > # of remaining free transactions? If so, I'm assuming a way to use > this should be put into Bank's customer transactions. Do not change the API for any class. Do not rely on changes in Bank to make your SavingsAccount work. We will use our Bank and won't even look at yours. ---------------------------------------------------------------------- > From: a classmate > To: eb@cs.umb.edu > Subject: bank testing > Date: Wed, 31 Mar 2004 17:43:07 -0500 > > when i was testing out SavingsAccount, i tried giving it a "cash check" command for fun. Bank crashed with: > transaction: ca > amount of check: 4 > java.lang.ClassCastException > at Bank.processTransactionsForAccount(Bank.java:168) > at Bank.visit(Bank.java:99) > at Bank.main(Bank.java:383) > Exception in thread "main" > > should i fix this, or just leave it alone since it's not really > part of the exercises? Don't try to fix anything. We will learn how to handle errors in Chapter 7. ---------------------------------------------------------------------- > From: a classmate > To: eb@cs.umb.edu > Subject: a qustion about turn in hw7 > Date: Wed, 31 Mar 2004 23:13:33 +0000 > > Prof. Bolker, > > Is that we only need to turn in SavingsAccount.java rather than all the > SubClass of BankAccount.java and Bank.java? See the answer to the first question in this email. We will look only at your SavingsAccount.java. It must work with all the rest of our classes.
From: Ethan BolkerTo: rmenard@cs.umb.edu Subject: turning in too much in the Bank exercise Date: Wed, 31 Mar 2004 20:08:09 -0500 (EST) When compiling and testing SavingsAccount be sure to use all our other class files, not ones compiled from source submitted by the students. In fact, take off a few points if people submit more than SavingsAccount.java for this problem. If people have already submitted extra files when they read this email they can effectively erase them by turning in empty files with the same names as the ones they shouldn't have turned in in the first place.