Due October 27, 10 points.
For this assignment you will complete an implementation of a queue using two stacks, then test it and compare its run time to a queue implemented from the Java standard library.
To complete the assignment you will need to implement code in just one class:
You will need to add or change code as indicated by the "FIXME" comments. Methods that return a value current just return dummy values. These should be corrected. Code needs to be added to the constructor and methods with no return value.
The twostackqueue.Main class contains code for testing the correctness and run time of your TwoStackQueue class, along with a StandardLibraryQueue class. This program takes about 40 seconds to run. Run it to check your code and see how its run time compares with the implementation based on the standard library.
You should turn in a copy of your code for the TwoStackQueue class. It should have your name included in comments. You should also turn in a modified script of the program execution.
You can create a script of the execution by right-clicking in the NetBeans "Output" pane and selecting "Save As..." from the popup menu. After saving the output, modify the file by adding the following information at the beginning:
You can determine the Java platform by clicking on the "Java Platforms" menu item in the NetBeans "Tools" menu. The best description of the platform is given in the "Platform Folder:" text field. You only need to use the last component of the path. For example, the platform I am currently using is "java-6-openjdk". You could be using "java-6-sun" or some other platform, with perhaps a different version number.