Advertisement
akosiraff

Sequence Efficiency Java

Nov 3rd, 2013
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1.  
  2. Download: http://solutionzip.com/downloads/sequence-efficiency-java/
  3. The third programming project involves writing a program to calculate the terms of the following sequence of numbers: 0 1 2 5 12 29 … where each term of the sequence is twice the previous term plus the second previous term. The 0th term of the sequence is 0. The interface to the program should be a GUI that looks similar to the following:
  4. The pair of radio buttons allows the user to choose whether an iterative or recursive method is used to compute the term of the sequence. When the user enters a value for n and then clicks the Compute button, the nth term of the sequence should be displayed in the Result field. The Efficiency field should contain the number of calls to the recursive method when the recursive option is chosen and the number of iterations of the loop when the iterative option is selected.
  5. The Iterative radio button should be initially set to selected.
  6. You should run your program with values for n from 0 to 10 and record and graph the value of the Efficiency field for both the iterative and recursive options. The graph should be contained in a Word document that also contains a brief explanation of the observed results. That document must also be submitted with the code for this project.
  7.  
  8. Download: http://solutionzip.com/downloads/sequence-efficiency-java/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement