Purpose

Are you as tired of these labs as I am? Words and Numbers every time! Lets do something different this time! Let's make a picture!

The purpose of this lab is to build a program with objects. Although this lab will require you to create only a simple picture, there will be much to learn. You will be required to use objects to represent the elements of your picture. You will also have your first experience with extending what comes with java and eclipse with an additional package. This package adds a “framework” for your picture creating program.

Requirements

You will write a program that draws a nice winter scene to get us all in the mood for winter. Of course, computers can do more than just show static pictures, so your picture will have a moving element.

Your picture should have:

  1. At least one seasonal element that does not move, like a tree.
  2. A snowman or elf that moves.
  3. The snowman MUST have objects that represent the parts; at a minimum there must be objects which correspond to the whole snowman and the head. These must be used to control the movement of the snowman. There are specialized mechanisms for moving these elements, but you will be required to move them yourself.

Think before programming

Much will be new in the context of building a program that manipulates pictures instead of words and numbers. To start with, we want you to understand that not everything comes with the eclipse/java environment that we installed at the start of class. In particular we are using the ACM Graphics Library. You will have to install this as shown in using the ACM library.

As you have seen in class, please, please start small. Start by copying some of the examples you have seen in class. Then change a little at a time.

As noted above, you will be required to make classes for the complex elements that you add to your picture. For example, you will need one that represents the whole snowman or elf. You will need one for the face.

Again, take a look at the examples for examples.

Pass-off procedure

When you have your program working, you will need to show it to a TA. The TA will evaluate your code based on the following criteria:

  1. As always start writing your program with small simple steps. Note that you do not have to show the TA each step individually. The TA will simply check that your program accomplishes each of these elements:
    1. Draw anything (any shape) at all (5 points)
    2. Draw the seasonal item (Christmas tree, wreath, etc). This does not have to move, but should be made of a few basic shapes, like rectangles or circles. (5 points)
    3. Draw the snowman or elf. This will be constructed of many basic shapes, like circles. (5 points)
    4. Make the snowman or elf move. (5 points)
  2. Is your code properly formatted (indenting blocks, comments, spacing, reasonable names of variables)? (5 points)

In order to receive points for part 1.4, you must define objects for the parts of the elf or snowman and use them to make it move.

5 points extra credit: Do an elf with legs and make it dance as it moves around!

Extra Credit: Pass off early (1 point per day (excluding Sunday) up to 3 points)

Further tips

For ideas on how to draw some different shapes and colors, see ACM library tips

cs-142/fall-2010/labs/preparing-for-winter.txt · Last modified: 2014/11/19 22:52 by ryancha
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0