CSCI 201

Fall 2001

Assignment 5


Part 1: Reworking Assignment 4 Using Interfaces and Arrays

Description:

You are given a JCreator project folder in the form of a self-extracting archive file as the starting point for this assignment. Download (right-click and select Save Target As ...) this link to access that archive file. When you extract the project folder (double-click on the archive file to extract it), you will find that the project folder is a slightly modified version of the folder that you received for assignment 4; it contains the following files:

The purpose of this program is, as it was in assignment 4, to create an ASCII version of a totem pole. The major difference between this assignment and assignment 4 is that: (1) all facial feature classes (i.e., Hair, Eyes, Nose, etc.) plus the Head must implement the FaceFeature interface, and (2) you are to use an array in two places:

The declarations for these arrays are in the appropriate places in the assign5 project given to you on the link above. Note where and how these arrays are declared---you must use those declarations in your modified program.

Your Task:

Modify your assignment 4 program to so that each facial feature class (i.e., Hair, Eyes, Nose, etc.) and the Head class implement the FaceFeature interface, and rewrite the Head and TotemPole class to use the two arrays described above. The simpliest way to accomplish this is to add the facial features classes that you wrote for assignment 4 (i.e., Ears, Eyes, Nose, and Chin) to the assign5 project. After you have added them to the assign5 project, modify them to implement the FaceFeature interface. The rewrite the Head and TotemPole classes in the assign5 project as necessary to complete the assignment.

What to Turn In

Turn in the all source code files that you modify in writing this program. This should include the following files:

You may also turn in Hair.java if you modify the copy that you are given.

Remember that the files you turn in must have exactly these names. You were shown how to transfer files to your class ftp directory in lab 1, here is a quick refresher.