CSC 103 Lab Notes Week 2, Part 2
Preparation for Turning In Assignment 1
Empirical Analysis of Sorting and Searching



  1. Assignment 1 is due by 9PM Monday 16 April 2001.

  2. Using the UNIX turnin program.
    1. Run the following commands from a UNIX terminal:
      cd
      cp -p .cshrc .cshrc.sav
      echo "set path = (~gfisher/classes/103/bin $path)" >> .cshrc
      source .cshrc
      
      This adds the 103/bin directory to the path where UNIX looks for programs to run.
    2. To turn in your assignment 1, do the following:
      1. Put your solution to the assignment in a single file named GeneralList.java. This means that you must use a local class to define the list node class.
      2. If you've worked on the program at home, copy to latte, compile it, and make sure that it runs as expected.
      3. Before you run the turnin program, change directory to the directory where the GeneralList.java file is stored
      4. Run the turnin program as follows, where plain font text is the prompting messages that the program prints, and the boldface text is what you type:
        Enter the e-mail address of the instructor or class account that
        you wish to mail this assignment to >
        gfisher

        Enter the name of this assignment > a1

        Enter the name of the file to be included.
        Enter return when done >
        GeneralList.java

        Enter the name of the file to be included.
        Enter return when done >

        Your assignment has been sent. If you do not receive a confirmation
        in the next few minutes, please contact your instructor
    3. You can run the turnin program as many times as you like up to the due date; the latest turn in will replace an earlier turn in.

  3. Empirical testing of sort and search algorithms.
    1. Copy the following files from ~gfisher/classes/103/examples:
      ListSortAndSearch.java
      ListSortAndSearchTest.java
      
    2. Compile and run the files as is.
    3. Experiment with the files as follows:
      1. Change the SIZE of the test list to see the effects on the algorithm running times -- BEWARE that the O(N2) running time for sort takes off on list sizes in the thousands.
      2. Instrument the sort and binarySearch algorithms with some appropriately-placed print statements to illustrate how the algorithms are working.




index | lectures | labs | handouts | examples | assignments | solutions | doc | grades | help