CSCI 201 Spring 2004
Programming Project 4
Project Description
In this assignment, you will work a modification of problem 4.13 on
page 267 of your text. Your job is to enhance the display produced by
the Lineup applet by adding hair to the stick figures such
as demonstrated in the screen capture below.
You are allowed a great deal of creative freedom in producing this
enhancement, and you are encouraged to make other enhancements as
well, but to receive full credit for this assignment, you must satisfy
the following 2 requirements:
- You much create and use a Head class in your program.
This class must implement any enhancements that you make to the stick
figure's head and hair. The Head class used to produce the display
above allows the user to specify any one of 3 different hair styles.
As a minimum, your Head class must allow the user to choose between 2
different hair styles.
- Your LineUp applet must display at least 2 different hair styles.
Getting Started
- Begin by downloading the code provided in listing 4.15 of your text:
LineUp.java,
LineUp.html
and StickFigure.java.
- After you have run the code and understood how it works, write a
Head class that can be used to create the head of each stick figure.
Begin by removing the code that creates the head from StickFigure.java
and placing it in your new Head class. Make sure that you can
recreate the heads of each stick figure using your new Head class.
- Modify your head class to draw one hair style and test it. After
completing one hair style, add at least one additional hair style and
include both hair styles in your LineUp display. Add additional
features to your stick figure if you desire, but all additional
features must be included in one of the three existing classes:
LineUp.java, StickFigure.java, or Head.java.
Programming Style
Note that 10% of your program grade is based on the readability of
your program. This includes things like proper indentation, comments,
and the naming of variables and methods. To receive full credit for
your program, make sure that you use proper indentation as
demonstrated in your text and in class room examples. Also include a
comment at the top of each program stating your name, the course, and
the purpose of the program:
// Name: your name here
//
// Course: CSCI 201
//
// Purpose: purpose of program here
//
Submitting Your Program
The program written for this assignment must be turned in by placing
the java source code files and the HTML file in the follow directory
in your linux account: csci/201/Lineup. All source code files
(i.e., LineUp.java, StickFigure.java and Head.java) and the
HTML file (LineUp.html) should be turned in, and the files
must have exactly those names. This project is due by
midnight of April 14th.