Assignment 1: Doubly Linked List

The assignment was to implement a Doubly Linked List in Java, and then to modify a fireworks simulator (created by James de St. Germain) so that it would use the Doubly Linked List instead of an Array List (as originally used in the simulator.)

I ran the simulator using each list a number of times, each time increasing the amount of fireworks to be generated.

It performed at similar speeds until the number of fireworks 'launched' was increased to 200, at which point the Doubly Linked List outperformed the Array List.

Here is a graph of the results:


Finally, I made a couple of small modifications to the fireworks simulator.  I modified Firework.java and Trail.java to make the fireworks flashing in 8 different colors, and I also made the trail appear in random colors, and a little bit larger to be more noticeable.




Home