The Java program in TimeStringConcat.java calculates the time is takes to build up a String of length n by repeatedly concatenating one character at a time to the String. The program takes 3 command-line parameters: the value n for the size of Strings to construct, the number of times to repeat the experiment to improve the accuracy of the timings, and a number, 0 or 1, which turns off or on a verbose output mode. To compile and run the program at the Unix command line (or a DOS prompt, or a Mac Terminal window), one would issue the command javac TimeStringConcat.java to compile to TimeStringConcat.class. If you don't already have your environment set up to have the structure package and your experiment needs any of our data structures from Bailey, you would need to have a command line more like javac -cp .:bailey.jar TimeStringConcat.java assuming bailey.jar is in your directory. Then run the program with java TimeStringConcat 128 1000 0 (for example) to run the program for n=128, repeat 1000 times, and verbose mode off. Or, if you would like to disable some of the compiler optimizations, add the -Xint flag (here I also added the classpath setup flag): java -Xint -cp .:bailey.jar 128 1000 0 When verbose mode is on, a few lines of output are printed about the timings computed. When verbose mode is off, it simply prints the value of n followed by the computed average time (in nanoseconds) for one instance of the String creation. The Bash script run_timings.sh runs the program 100 times: 10 each with values of n for all powers of 2 from 16 to 8192. If one wanted to capture the output of all 100 runs to a file "timings.out", the command ./run_timings.sh > timings.out would do the job, and would produce a file with 100 lines, suitable for postprocessing into appropriate tabular or graphical forms. There are certainly similar mechanisms available on Windows (perhaps even bash itself), but you might want to consider using the Macs in Science Center 469A to run your timings if you do not have a suitable machine available to you. The following procedure should make it possible for you to run timings on the Macs in SC 469A using scripts based on the bash script in this directory. - Log into a Mac in SC 469A. Your standard Saint Rose username and password should work. - Open a Terminal Window. One way to do this is to type "Terminal" in the "Spotlight" window, which is the little magnifying glass icon near the upper right corner. - Locate your folder for your shared drive space. In any "Finder" window (the ones with the icons of folders and files) you should see it and be able to navigate to it from the "SAN" entry under "Shared". Find your folder with code for this lab. Once there, you can go to the Terminal prompt, type "cd " and then drag the little icon at the top of your Finder window into that Terminal. Hit Enter, and you'll be in the folder for your code. - Make sure you have bailey.jar somewhere convenient (this folder is a good choice), then you can run your program and/or scripts that run the program to generate files of timing results.