CS 1121 Homework Assignment 1

DUE DATE: Friday, October 2, 2009 at 10:00pm

You must do this assignment by yourself. Help from your instructor, any lab TA or assistant, or any learning center coach is permitted (and encouraged) however.


Read the entire assignment before starting.
There is important information everywhere.

Description

Your task is to write several Java clases that produce an animation that draws at least the following:

In addition, there must be some sort of interaction between the two objects that move.

Please BE CREATIVE. Just make sure we can see the required things so we can grade it. Also, it cannot simply be a minor modification of a lab assignment.

You must have a separate class definition for each type of object in the scene (e.g., if you have three trees, you don't need a separate class for each - one generic "Tree" class will work). Your main class must create objects defined by these other classes and include them in the animation. The object defined by your main class can only draw one thing - everything else must be drawn by other objects defined by other classes.

Grading

You must follow these guidelines to receive full credit on this assignment

Grading Followup

After we have graded your assignment we will hand it back during your next lab session. At that time your TA will ask you a couple of questions about your code, or at least the part of your code that works (if your program didn't work at all, then you won't be asked any questions). These questions will be fairly simple (see examples below) and should only take a couple of minutes to answer. If you cannot answer them to the TA's satisfaction, then your TA will ask you to see Dr. Poplawski, who will ask you a couple of other questions about your code. If you can't answer these questions to Dr. Poplawski's satisfaction you may lose up to 50 points on this assignment.

So, make sure you understand how your code works. If you wrote the program yourself, and didn't simply keep trying things until something accidentally worked, then you should have no difficulty answering the questions.

The kind of questions we will ask will be like:

Hence questions will generally be of four types:

Getting Started

Start up Eclipse and create a project called "hw1". Then create a class called

(all upper case), which will be your main class. It should have a startup method to create all your other objects, and a draw method to draw something itself. Create other classes for drawing other things - you can name them whatever you like.

Submitting

Get into the proper workspace directory containing the .java files for this assignment, then type 1121submit to submit your code. Be sure to submit every .java file you created. Make sure your main class file is HW1.java (both the H and the W are upper case). If it isn't you will get 0 on this assignment.


IMPORTANT

The 1121submit command decides whether or not your assignment is submitted late based on the clock inside the machine you are submitting on, not the clock on the wall, not your watch, etc. If you want to know what time the machine thinks it is, type "date" at your UNIX prompt. You must submit your program on time to receive credit.

If you do not submit on time, you will receive 0.

SUGGESTION

If you are still working when the due date/time is getting near, then you should submit whatever you have done at least 5-10 minutes before it will be late. You can resubmit as many times as you like, so if you get it working better, submit it again. Hopefully you will get it done before it will be late, but if not at least you will have submitted your best version and will be able to get some partial credit. And don't forget - never make changes and then submit without first compiling and testing.