ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 25 Apr 2017 My Price 9.00

1Project 3This programming project

This 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 and the 1st term of the sequence is 1.

 

1Project 3This programming project involves writing a program to calculate the terms of the following sequence ofnumbers: 0 1 2 5 12 29 ... where each term of the sequence is twice the previous term plus the secondprevious term. The 0thterm of the sequence is 0 and the 1stterm of the sequence is 1.For example:0 1 2 -> (0 + 1 + 2) + 2 = 50 1 2 5 -> (0 + 1 + 2 + 5) + 5 = 120 1 2 5 12 -> (0 + 1 + 2 + 5 + 12) + 12 = 29…The interface to the program should be a 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 tocompute the term of the sequence. When the user enters a value fornand then clicks theComputebutton,thenthterm of the sequence should be displayed in theResultfield. TheEfficiencyfield should contain thenumber of calls to the recursive method when the recursive option is chosen and the number of iterationsof the loop when the iterative option is selected.TheIterativeradio button should be initially set to selected.When the window is closed, the efficiency values should be computed with values ofnfrom 0 to 10 andwritten to a file. Each line of the file should contain the value ofn, the efficiency of the iterative methodfor that value ofnand the efficiency of the recursive method. The values should be separated by commasso the file can be opened with Excel and used to graph the value of the efficiencies for both the iterativeand recursive options along theyaxis with the value ofnalong thex-axis. The graph should be includedin the Word document that accompanies this project and should also contain a brief explanation of theobserved results.The program should consist of two classes.1.The first class should define the GUI. In addition to the main method and a constructor to buildthe GUI, an event handler will be needed to handle theComputebutton click and another handlerwill be needed to produce the file described above when the window is closed. The latter handlershould be an object of an inner class that extends the WindowAdapter class.

Answers

(11)
Status NEW Posted 25 Apr 2017 04:04 AM My Price 9.00

-----------

Not Rated(0)