CSC 210 Program #2Drawable Shapes |
|||||
LogisticsGo...
We'll continue on the GUI theme with swing and let's do an applet, shall we. I'll show you how to use your North Central College web page as well. Oh, you didn't know you had one? Stay tuned. DescriptionPick up your text... page 164... go ahead, I'll wait. In Program #2, we're going to complete and extend the "Drawable Shapes" project described on pages 164-185. [ Bill note: why is my spell-checker complaining about "drawable"? The online dictionary has it: http://dictionary.reference.com/search?q=drawable ] So, there's a bunch of code already written for you. A copy of the code from the book is already on the k: drive in the common_area; it's also at the book's web site. OK, so we've got that covered, now what. Please add the following to make your program run:
That's about all I can think of for now. Stay tuned. ImplementationPrint out the book's code and digest it. Also, the book has some nice URL diagrams that should help. I believe that the implementation of Rectangle is complete, so you can use it as a guide. This is a test of your ability to "get" inheritance and interfaces and all that. Add your classes and run! The W: drive at North Central college behave like any other drive... copy files to it and such. However, once you get web-readable files, like index.htm, they are visible as web pages on the WWW. The URL or address of your web page will be <first_name>.<last_name>.students.noctrl.edu. We tried it for Kim and here's her "Hello, World page: http://kim.opalka.students.noctrl.edu/ You'll need to create an index.htm that calls your applet and then copy all the necessary *.class files over to the W: drive. This should be a last step... get your program running as an application first. GradingThe same as Program #1, pretty much. By the due date, please place your work for Program #2 in your folder on the k: drive. I'll be looking for:
Of course, your code must be beautiful and follow the class coding guidelines. Code that does not meet this metric will be served a harsh brand of grading justice. EtcI'll post hints and such (like correcting instructor errata) here as the week goes by. Remember to do a toString() method for each of your classes. I had some problems getting jGRASP to do packages. If you have similar problems, then just comment out the package statement at the top of each file. That worked for me. Try it with the package statement first though. Hey, if you want to add a button to the top of your JFrame to add shapes, go for it. Get it? Apr 10, 2006... If you get this error: Note: Recompile with -Xlint:deprecation for details" Then, comment out the call to method show() for a JFrame. It's no longer necessary, and your error should go away. BTW, if you want to re-compile with some option in jGRASP, like the message recommends, then
Phew. thanks... yow, bill |
...