Assignment 1 for CSE 373 (Autumn 2008) | |
Due Sunday, October 5, at 11:45 PM. | |
CSE 373: Data Structures and Algorithms The University of Washington, Seattle, Autumn 2008 | |
Using the resources provided and guidelines below, implement a Java program
that demonstrates the operation of a stack using digital photographs as data.
Your program will accept three
input strings, and create a folder containing a set of
web pages (using HTML markup). One of your three input strings will be the
name of a folder containing images.
After your program is working, provide details on two
test runs. In the first run, use the given data for
EXAMPLE1. In the second run, EXAMPLE2, create your own data.
A sample command-line string to run your program is this: Input file format: There are three strings passed as arguments to the main method of the program. The first string is the name of a file of commands (PUSH and POP commands) to be performed. The second string is the name of a folder containing images. The third string is the name of an output folder that your program will create. For the format of the file of commands, see the sample data file "test-commands.txt" in the zip archive ImageStacking-Sample-Data.zip. Each line in this file starts with either "PUSH" or "POP". If it is "PUSH", then there is a space and then the name of an image file. This file must exist in the folder of images named by the second argument. Output file format: Besides the output folder being created, there will be one HTML page (a text file) created corresponding to each command in the input file. For the format of the output pages, see the output folder in the zip archive ImageStacking-Sample-Data.zip. Requirements:
Resources Provided: A similar application called ImageArray.java is available to use as starting code. It is provided here as the zipped up version of an Eclipse 3.4 project. A sample command file and images are included, as is the output. Here it is: ImageArray.zip. Also, here is some sample input and output for the ImageStacking assignment program. It's in ImageStacking-Sample-Data.zip. Hints and suggestions:
Turning in your work: Turn in a zip archive containing: (1) your code, (2) input and output data files for two runs. The first run will be using the provided images and a new command file: EXAMPLE1-commands.txt, and the second run will use five images that you provide (don't use any of the given ones) and a new file of commands that you name "EXAMPLE2-commands.txt". Note that the graders may also test your program on other inputs than the ones being made available to you. Turn in your assignment using Catalyst CollectIt. After you have turned in the assignment, please provide feedback via this WebQ questionnaire. | |
updated Sept. 25, 2008.