educational course/tutorialoutlet.com educational course/tutorialoutlet.com | Page 29

added to the IntListElement class from problem 1, that takes one integer parameters, n, and returns the value stored in the data field of the nth element of the list( starting with 0 being the first element). For example if myList pointed to the list containing the 5 elements 100, 200, 300, 400, 500 then executing x = myList. get( 3); would store 400 in x.--------------------------------------------------------------------------------------- COM 140Project 3
FOR MORE CLASSES VISIT www. tutorialoutlet. com

added to the IntListElement class from problem 1, that takes one integer parameters, n, and returns the value stored in the data field of the nth element of the list( starting with 0 being the first element). For example if myList pointed to the list containing the 5 elements 100, 200, 300, 400, 500 then executing x = myList. get( 3); would store 400 in x.--------------------------------------------------------------------------------------- COM 140Project 3

FOR MORE CLASSES VISIT www. tutorialoutlet. com

Project 3 1. Specification The third programming project involves writing a program to calculate the terms of the following sequence of numbers: 0 1 1 3 5 11 21 43 … where each term is twice the second previous term plus the previous term. The 0th term of the sequence is 0 and the 1st term of the sequence is 1. The example below shows how to calculate the next sequence term: Current sequence: 0 1 Current sequence: 0 1 1 Current sequence: 0 1 1 3 Current sequence: 0 1 1 3 5 … etc. Calculate next term: 2 * 0 + 1 = 1 Calculate next term: 2 * 1 + 1 = 3 Calculate next term: 2 * 1 + 3 = 5 Calculate next term: 2 * 3 + 5 = 11 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