This week you can choose what you want to simulate. The only requirement is that it either simulate a data structure (e.g. stack, queue, tree, heap) or use a data structure as an integral part of the simulation. Some suggestions are given below.
You have two weeks for this project, which will be due after Thanksgiving break. During the first week, please email Professor Maxwell with your project idea.
Documentation for Java 1.5 is located at: Java 1.5 SE API.
Documentation for Java 1.6 is located at: Java 1.6 SE API
You can choose this week from one of two types of simulations. First, you could visually simulate a data structure from the list below, with elements adding and removing themselves so as to demonstrate to an observer the functionality of the data structure. If you choose this option, you must write the data structure class yourself, just as you wrote the Queue data structure for the Checkout simulation.
The second choice is to develop a simulation that uses a data structure from the list below as an integral part of its operation. The Checkout simulation is one example. If you chose this option, you may use a Java library implementation of the data structure.
The following are some of the data structures you could simulate/use.
- Stack and a queue (both)
- Doubly-linked list
- Binary Tree (balanced or not)
- Heap (useful for identifying the N closest neighbors)
- Hash map
- Build your simulation. If you chose to simulate a data structure, create a visual representation of the structure with the nodes of the structure as agents. Then demonstrate adding, removing, or other operations on your structure. It would be great if the user could manipulate the data structure somehow, even through a simple command line menu and interface.
- Identify a set of computable attributes of your simulation. For example, last week you computed the number of agents, the amount of broccoli, and some average attributes of the agents. If you simulate a data structure, the calculate attributes like the average time to insert or delete an element from the structure (complexity analysis).
- Use more than one data structure from the list.
- Create a nice user interface to the visual representation of a data structure.
- Let the user interact with the simulation.
Make your writeup for the project a wiki page in your personal space. If you have questions about making a wiki page, stop by my office or ask in lab.
Your writeup should have a simple format.
- A brief description of the overall task, in your own words.
- As explanation of your solution, focusing on the interesting bits. The most interesting bits for this project are your data structures. Any extensions you did are also interesting.
- Printouts, pictures, or results to show what you did. You can do screen captures of your terminal to show the initial and final landscapes.
- Other results to demonstrate extensions you undertook.
- A brief conclusion and description of what you learned.
Once you have written up your assignment, give the page the label:
You can give any page a label when you're editing it using the label field at the bottom of the page.
Do not put code on your writeup page or anywhere it can be publicly accessed. To hand in code, please put it on the Academics server in your folder within the COMP/CS231 directory.