Homework is always due at the beginning of class on the Tuesday, February 13.. (If I don't say "at the beginning of class," people will be rushing in at the end of the period, out of breath, having missed the entire lecture. This is not good education.) Automatic 2 point (of 10) penalty for lateness. Also: I sometimes give out a model solution on the due date, followed by a quiz on what you should have learned doing the homework. There are no make-up quizzes, but absence for valid reasons will be accepted.
Yes,
there will be a quiz that day.
Oops. I didn't announce this in time. Make that
Tuesday, Feb 20.
This homework will be done in teams of two, which I will assign. I strongly urge you to work together closely. One proven technique: the two of you sit at one computer. One person types, the other watches, corrects, suggests, etc. Every 20 minutes or so you trade places. This is called pair programming, and is widely used in industry as well as in education. Try it. You might be surprised how effective it is.
Of course you can still work separately, on your own computers at home or wherever, and exchange code via email. But even if you do that, give pair programming a try anyway. And whatever else: each assigned team turns in one program.
Modify HW1StarterKit.java, on the course CD, to do the following things:
All output still goes to the console, which is highly unrealistic. We will fix that in later homework.
Recall that the user must press Enter after entering data into any textfield, to activate the action listener on that field. There is no way to enter all the data, without pressing Enter, then click a Submit button. Also highly unrealistic; will also be fixed in future homework. It is still permissible to enter the data in any order, but in this version of the HW the ZIP needs to be entered last to get expected results.
We will make this application much more realistic in later homeworks, starting with HW2. For a first homework you have a lot of things to learn: how to use Eclipse, how the starter program works, Java syntax, and more. We don’t try to do everything in the first homework.
Here is the GUI produced by a modified version of the starter kit program on the course CD, after the user entered some data:

Here is the Console output (an Eclipse region) when the user pressed Enter after each entry:

Forcing the user to press Enter after each data field entry is highly unrealistic. We'll fix in the second homework. And if things don't look right as you work on the solution, maybe you forgot to press Enter after each item. (How do I know this? Think about it.)
It is very important that you do your own work on this. (In teams, of course.) You will be expected to be able to explain it, on a quiz. In two weeks or so. There are a lot of concepts and details here.
Back to the top of the Spring 2007 CSc 221 page
Back to Dan McCracken's Home Page
PS: If you look the HTML for this page (right-click anywhere and pull down to View Source or similar), you will see some truly ugly stuff. What you get when you copy and paste from a Word document using FrontPage. Unthinkable on a production Web page. Saves a LOT of time for me, on something like this, so I hold my nose and do it. Don't try this in 473!