The purpose of this week's lab is to let you design your own
simulation, now that you have some familiarity with creating
simulations, creating graphical visualizations, and responding to user
input.
Problem Description
You can choose one of three options for this week's project.
-
Choose a data structure from the list below and create a visual
demonstration of how it works using the simulation framework we have
developed. Your demonstration should include all elements of the
functionality of the data structure, including adding and removing
elements. The visual demonstration should incorporate user
interaction.
-
Develop a novel simulation, or significantly extend a prior
simulation. The simulation must make use of one of the data structures
from the list below. Incorporate some form of user interaction in the
simulation, even if it is as simple as run/stop buttons.
-
Create a simple game that makes use of a data structure from the list
below. Obviously, this needs to incorporate user interaction. The
game does not have to be fun, but it helps.
Data structure list:
-
Dynamic Array List (grows as needed)
-
Heap
-
Binary tree (balanced or unbalanced)
-
Red-black tree
-
Other tree structures
-
Hash map
-
Graph
Tasks
-
Design your simulation. Make this a wiki design document that
describes the various classes you plan to use and how they interact.
You may want to provide method headers for the more important methods
(i.e. not simple accessors or mutators). This will be the first half
of your writeup.
-
Implement the data structure you chose from the list above. If your
chosen project uses more than one type of data structure, you have to
implement only one of them yourself. You can use the Java standard
implementations for the rest.
-
Implement your project, including some level of interaction.
-
Demonstrate your project to the prof when you are done, or close to
it.
Extensions
-
Implement more than one data structure.
-
Make a fancier interface than a few buttons.
-
Do some testing of your data structure and demonstrate its big O()
properties for tasks like adding and removing elements.
-
For simulations, demonstrate the effect of changing certain parameters
on the system. Make graphs or movies.
-
Just make it really, really, cool.
Handin
Before handing in your code, double check that it is well-styled:
-
All variable names and function names use camelCase.
- All class names are in PascalCase.
- All public classes and methods use complete JavaDoc. (Double-check this by hand; the
javadoc
will only point out malformed Javadoc, not alert you to missing documentation!)
- All private class members (fields and methods) have their own descriptive comment (but not JavaDoc).
- Comments are added to explain complicated code blocks.
- All variable and function names are appropriately descriptive.
- All indenting and squigly-braces are properly placed.
- Each concrete (non-abstract) class should have a unit test (main method) that calls and tests all methods in the class.
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 interesting bits here are how you modified the basic design and implemented different simulations.
-
Printouts, pictures, animations, or results to show what you did.
-
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:
cs231f13project8
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, put it on the Courses volume in your folder
within the COMP/CS231 directory.