Answered You can hire a professional tutor to get the answer.

QUESTION

The interface to the program should be a Swing based GUI that looks similar to the following:

The interface to the program should be a Swing based GUI that looks similar to the following:

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 (the Iterative radio button should be initially selected). When the user enters a value for n and then clicks the Compute button, the nth term of the sequence (counting from zero) 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. The program will check the validity of the user input value which should be a positive integer. A message will be shown in a JOptionPane for illegal entered values.

When the window is closed, the efficiency values should be computed with values of n from 0 to 15 and written to a text file outData.txt. Each line of the file should contain the value of n, the efficiency of the recursive method for that value of n and the efficiency of the iterative method. The values should be separated by commas so the file can be opened with Excel and used to graph the value of the efficiencies for both the recursive and iterative options along the y axis and with the value of n along the x-axis. The graph should be included in the solution description document that accompanies this project and should also contain a brief explanation of the observed results.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question