Writing a program to calculate the terms

Assignment Help JAVA Programming
Reference no: EM13810365

Instructions

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 and the 1st term of the sequence is 1. 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 to compute the term of the sequence. When the user enters a value for nand 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.

The Iterative radio button should be initially set to selected.

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. 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 the Word document that accompanies this project and should also contains a brief explanation of the observed results.

Reference no: EM13810365

Questions Cloud

Major milestones of the telecommunications industry : Create a timeline illustrating the major milestones of the telecommunications industry, including networking and voice, using Microsoft® Word, PowerPoint, or Excel
Describe the protocols and functions of each layer in detail : ISO/OSI Network Reference Model- Define and explain the model including the seven layers for the ISO/OSI Network Reference Model. Describe the protocols and functions of each layer in detail
Measures of forecast accuracy : using the naive method (most recent value) as the forecast for the next week, compute the following measures of forecast accuracy.
Communication and crisis planning : Communication and Crisis Planning
Writing a program to calculate the terms : 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 s..
Where in the process did the burger king fry flop : Go through the strategic process 5 steps for the Burger King fry. (Vision, Goals/Objectives, Crafting Strategy, Implementation Execution, Assess) Where in the process did the Burger King fry flop? How did MD’s combat the Burger King fry strategy?
Purchased the bond today and held it until maturity : Billy Bobs, Inc has a $1000 par value bond that is currently selling for $911.It has an annual coupon rate of 11.70%, paid semi-annually, and has 28-years remaining until maturity What would the annual yield to maturity be on the bond if you purchase..
Writing a program to calculate state income tax : The second programming project involves writing a program to calculate state income tax for a single taxpayer that uses a GUI. The GUI should use the grid layout manager and should looks similar to the following: The salary income, interest income..
Average tax rate that firm pays or marginal tax rate firm : Regarding income taxes, which do you think is more important (and why)-- the average tax rate that a firm pays or the marginal tax rate the firm is paying?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Template files contain the message text

Template files contain the message text, together with variable fields(such as Dear [Title] [Last Name ] ...). A database (stored as a text file) contains the field values for each recipient. Use HTML as the output file format. Then design and implem..

  Program that simulates the rolling of a single die1000 times

Write a program that simulates the rolling of a single die 1000 times. The program must use an array of size 6 and not 1000 to store the occurrences of each side or face on the six-sided die. The program should output the particular die face and the ..

  Write a java application program called largest.java

Write a Java application program called Largest.java that inputs a series of 10 single-digit numbers and determines and prints the largest of the numbers

  Calculate rental fee for different types of borrowable media

Assume that there is an abstract class called Vehicle, which has two concrete subclasses, Car and Truck. There is also an interface Loadable, which only Truck implements - calculate a rental fee for different types of borrowable media (e.g. books,..

  Show running versions of the program

Show three running versions of the program in a single screen shot with 3 different size stop signs - Make the circle a red filled circle. Add 4 buttons below the Left-Right-Up-Down buttons with Red and any three other colours.

  Java program that allows the user to enter a letter

Write a java program that allows the user to enter a letter (as a code) and a real number (as the radius of a circle). If the letter is 'A' your program must calculate the area of the circle. If the letter is 'C' your program must calculate the ci..

  Write an expression those results in a string consisting

Write an expression those results in a string consisting of the third through tenth characters of the strings. Make this program using java programming.

  Write a class lines containing a static method

Write a class Lines containing a static method dashedLine to draw dashed lines, so it can write:

  Projectyou will create a secure parts inventory catalog

projectyou will create a secure parts inventory catalog system using model 2 architecture. the application will require

  Java program to compare two variables if they are equal

Write down program which will ask user to initialize two character arrays, program must compare two variables if they are equal.

  Program should assign a seat in the first class

If a person enters 1, your program should assign a seat in the first class (rows 1 - 3). If a person enters 2, your program should assign a seat in business class (rows 4 - 7). If a person enters 3, your program should assign a seat in economy class ..

  Modify each sorting algorithm

Modify each sorting algorithm so that it keeps track of the number of comparisons it performs and the number of exchanges (swaps) it performs during a single sorting operation. Keep track of these numbers using two long integer counters

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd