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

  The federal acquisition regulation

According to the text, the Federal Acquisition Regulation (FAR) is a body of law that governs U.S. Federal Government's procurement process. The FAR is prepared, issued and maintained under the joint command of the Secretary of Defense, the Administr..

  Small computer system interface-standard computer disk

How many primary drive partitions are supported on computers that still conform to the standard established by MS-DOS? How many total partitions can a standard computer disk [Intergrated Drive Electronics (IDE)/Serial Advanced Technology Attachment (..

  Give an implementation of the queue adt using an array

Give an implementation of the Deque ADT using an array, so that each of the update methods run in O(1) time. Program has to be written in Java.

  Trade-offs between quantity and quality of production

Are there inevitable trade-offs between quantity and quality of production and in what ways can job analysis and job redesign help manage there trade-offs?

  Determine the purpose of using javascriptreg on a website

what is the purpose of using javascriptreg on a website? what is a specific example of a javascriptreg application that

  Java socket hello i need to this assignment done in net

hello i need to this assignment done in net beans . and i want comment in code .also screen shots of running program

  Http://www.homeworkmarket.com/content/need-help-java-program

Write a Java application program that takes in user input from keyboard and calculate semester grade based on the scores. In this assignment, you are going to rewrite the program, instead of taking keyboard input, you will use dialog box to prompt..

  Text file containing the data

This program should begin by asking the user for the name of a text file containing the data. Then read the data which will be a line containing the dimensions of a 2 dimensional array followed by a 2 dimensional array of ints. Then perform variou..

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Write down an applet which displays a 4x4 grid when the

write an applet that displays a 4x4 grid. when the user clicks on a square in the grid the applet should draw a filled

  Explain how you would minimize the errors

What are the three types of errors that you can encounter in a Java program? Describe them, and explain how you would minimize the errors

  You need to train for 10 weeks

You are preparing for a marathon. In order to prepare, you need to train for 10 weeks, running an increasing number of miles per week, starting at running at least 2 miles your first week up to 26 miles by week 10.

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