Assignment 3 – Assessing Recursive Algorithms

Maximum Points = 50

The purpose of this lab is to provide you an opportunity to compare recursive and iterative algorithms.

 

Your program (application or applet) will:

1)    Use a GUI to allow the user to select one of the algorithms

2)    Ask the user for the size (n) of the data to be tested

3)    Use the information from 1-2 and both a recursive method and an iterative method for the algorithm to provide a time comparison for the two methods.

4)    Allow the user to continue with a different value for n

 

You program should allow the user to select from at least two different algorithms. One of the algorithms must be computing the Fibonacci number for n.

 

(Due before class on Thursday, February 25, 2010)

a) Submit your .java files containing your program.

b) Submit a brief report that answers the following questions:

            i) Did the results from running this program surprise you? Did you get the results you expected? Explain.

            ii) Describe the limitations to using this program.

            iii) Besides using the Timer, explain other ways that you could use to compare these algorithms?

            iv) Explain what was the greatest challenge in this program?

            v) If you had more time, how could you have improved your program?

 Grades are determined using the following scale:

Grading Rubric  (Word document)