CSE 142 Spring 2002Homework #7Lights! Camera! Action!!
|
uwcse.jar
that
allows you to move GWindow
's on the screen, and to set their background
color, is available.
We will not be making bug fixes with this version, and will not help with installation problems.
If you want to try it, go here.
For this assignment you may work with one partner. If you work with a partner, the two of you should turn in a single program and report with both of your names on it. Somewhat more work will be expected from a group of two than from an individual.
Your project should:
A good example of a suitable project would be a game or animation, where there are several different kinds of objects that react to events and/or interact in some way. If you're having trouble thinking of good ideas, you might think about building a scaled-down version of a video game you like. You don't necessarily need to implement a game, as long as what you do meets the minimal requirements.
You are free to use other Java classes and code that you find in libraries, however, you must give credit in your report explaining anything you used outside the basic CSE142 and Sun standard Java libraries. You also must do a non-trivial amount of programming, creating new classes - you can't just, for example, take the GraphicsComposer program from lecture and add mouse handling to it.
You and your partner (if you have one) should write a short one- or two-sentence description of your project. Don't describe the code, but tell what the program is intended to do. It should be a description that a non-programmer would understand. Obviously, as you implement the project the details may change, but this description should reflect your intentions for the final project.
Email this description along with your name and section and (if you have one) your partner's name and section to your TA by 6:00 pm, Friday May 31. If you are working with a partner, both of you should send a copy of this message to your respective TAs. The TAs will check to be sure that what you are proposing sounds reasonable and, if there are any problems, will get in touch with you via email. This is meant as a quick check to alert you to possible problems; if everything looks ok, your TA may not need to reply.
Here are some ideas to help you start organizing your project.
The basic idea behind animation or simulation is to repeatedly change the state of the objects involved, then update views so they reflect those changes. For graphical views, you've already seen something similar in HW3 - bouncing balls - but we didn't explain the details at that time. Here's how it works. When it's time to update the state of all of the objects, send a suspendRepaints message to the GWindow, e.g.,
theWindow.suspendRepaints();(where
theWindow
is the name of your GWindow).
Then update all of the objects involved in the animation. When you are done updating,
do the following:theWindow.resumeRepaints(); Thread.yield();That signals the window to resume drawing, and yields control of the computer's processor momentarily so the graphics system can update the window.
Prepare a short (at most 2 pages) written report with the following information:
If you work with someone, both of you will receive the same score for the assignment, except in unusual circumstances.
Grading will be done in person with a TA, with both partners present. You will have to make an appointment with the TA to meet in the IPL. Details will be discussed in sections. If you and your partner have different TAs, make an appointment with one of them; we reserve the right to switch you to the other TA if necessary for scheduling or load-balancing reasons.
At the grading appointment, be prepared
Both partners should be fully prepared to handle either aspect. The demo will be done from our on-line copy of the code as turned in electronically. You will not have to bring the code on a diskette. The demo period will be short. It would be a good idea to rehearse a 4 or 5 minute demo in advance. Both partners need to show up, at the scheduled time, or the project may receive a grade of zero.
Electronically turn in your files using this turnin form. Turn in your report in sections on Thursday, June 6. Remember that if you work with a partner, the two of you should turn in a single program and report.
Have lots of fun!