I think that I like the authors' StdDraw etc. routines better than the students seem to, but maybe I'm easily swayed by a few ho-hum reactions. Anyway, though I don't want to get carried away with GUI development, since it's not our real purpose here, I think that we can usefully spend some time using the GUI tools provided with the NetBeans IDE.
On Tuesday we'll use tutorials from netbeans.org to write both console and GUI apps. (We'll use the Java SE version of NetBeans.) And I'll show you a few short programs that I've written with bits of GUI that you can use to make an interface that allows the user to click the mouse to set the vertices of a polygon and then scale it and turn it using sliders or other gadgets.
We'll get experience with a bona-fide complex modern IDE and learn to use typical ready-made object relationships for a GUI at the same time that we are talking about our own OO constructions in class.
So yes, we're going on with the roll-our-own polygon routines. We'll certainly need matrix operations for these, so you can get started right away on the Matrix ops whose API for Matrix that I pointed out in the book. You'll need a main( ) method in Matrix written for testing only. It should have a console interface similar to ones shown in 2.2: from the console, or by redirection from a file, read two values M and N representing number of rows and number of columns, then M rows of N numbers. That's for one matrix. Adapt this model for vector * matrix ops, matrix * matrix ops, etc. Check the answers with a calculator.
We'll talk on Tuesday about just how to test the Matrix API, which will be due on Thursday, November 6, as well as expectations (including due date) for the polygon program.
This is going to be fun!
Sunday, October 26, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment