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

  Write a statement to create a jframe object

Write a statement to create a JFrame object with a title of "My GUI Application" - Write a Java statement to have the object from the question above manage its display area by dividing it into 3 rows which have 4 columns each.

  Feature of object-oriented programming

Use the Internet or Strayer databases to research the advantages, features, and common examples of OOP and EDP. Describe at least one (1) feature of object-oriented programming that Visual Logic lacks

  To report the amount of the fine

To report the amount of the fine, which is $25 for the first hour or pan of an hour that the car is illegally parked, plus $10 for every additional hour or part of an hour that the car is illegally parked

  Discuss how an interface differs from a class

Discuss how an interface differs from a class, how interfaces are defined, and what does implementing an interface mean.

  Application that will allow a new customer to order a house

Create an application that will allow a new customer to order a house. You'll allow the customer to choose among four models (Aspen, Britattany, Colonial, and Dartmoor) by creating separate ButtonGroups.

  Balanced and competitive business practices

The United States has several laws that are intended to further fair, balanced, and competitive business practices. Do you think that such laws are effective? If so, why? If not, why not? Be sure to provide evidence to support your position one way o..

  Declare a string variable named empty

Declare a string variable named empty, and initialize it to the empty string.

  Use java or c++ to create a program for making the pizza

Make the Pizza example abstract, so that there are three kinds of factories under one AbstractPizzaFactory You can use Java or C++

  Java programming arrays

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..

  Addressed with attributable risk

Which of the following questions is addressed with attributable risk?

  Write a recursive method to produce a pattern

Write a recursive method to produce a pattern of n lines of asterisks.

  Write a java program that accepts a positive long integer

Write a Java program that accepts a positive long integer between 2 to 15, and then using the number, calculate its factorial (n!). Using do-while statement, make sure it only accepts a valid number (between 2 and 15) - if an invalid number is ent..

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