Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can someone let me know if this is correct Problem 1: an array that contains the days of the week.and chart The storyboard is the

can someone let me know if this is correct

Problem 1: an array that contains the days of the week.and chart

The storyboard is the basic type of the prototype. It is a paper form of the interface showing the system screen. It helps to understand the flow of information in a very easy way.The desired storyboard is as given below:

var nowArray: Array = new Array();

nowArray[0] = "Sunday";

nowArray[1] = "Monday";

nowArray[2] = "Tuesday";

nowArray[3] = "Wednesday";

nowArray[4] = "Thursday";

nowArray[5] = "Friday";

nowArray[6] = "Saturday";

(nowArray[1,2,3,4,5,6,7]);

For loop = LBound(nArray) to UBound(nowArray)

strQueryString = stringOfQueryString & " nowArray =" & nowArray (Loop)

stringOfQueryString = stringOfQueryString & "&"

Next

Conduct research on the Fibonacci sequence. Include examples and real world application for it.

Fibonacci Series is a series where each term is computed by sum of previous two terms. The first and second term of series is 1. The Java program as an example to generate Fibonacci series is as given below:

/*This Program to prints the Fibonacci series. It uses two methods which are called recursively to generate the series.*/

//Importing package for using Scanner class

import java.util.Scanner;

// Define OutputBox class

public class OutputBox

{

// main method

public static void main(String args[])

{

// display output

System.out.println("Enter N: ");

// prompt user to input a number

int n = new Scanner(System.in).nextInt();

// display output

System.out.println("Fibonacci series till " + n +" is : ");

//for() loop to print Fibonacci series for the specified number of Terms

for(int i=1; i<=1000; i++)

{

// condition to print Fibonacci series

if(Computefibonacci(i)<=n)

// display output

System.out.print(Computefibonacci(i) +" ");

// condition to exit

if(Computefibonacci(i)>n)

break;

}

// main() method ends here

}

Fibonacci Series is a series where the sum of the past number is add to number before that. The first and second term of series is 1. Programs compute the Fibonacci series using recursion. Two user defined methods are used in the program. Recfibonacci(int number),this is a recursive method. Computefibonacci(int number) method is used to compute the next term of series. A value of Max_Number is prompted from user. If value of last term exceeds this value then the program stops after displaying the message.

// Recursive method to generate Fibonacci series

public static int Recfibonacci(int number)

{

if(number == 1 || number == 2)

{

return 1;

}

//recursive call

return Recfibonacci(number-1) + Recfibonacci(number-2);

// method ends here

}

//Computing Fibonacci term by adding previous two terms

public static int Computefibonacci(int number)

{

// condition to find Fibonacci series

if(number == 1 || number == 2)

{

return 1;

}

else

// calling method recursively

return Computefibonacci(number-1) + Computefibonacci(number-2);

// method ends here

}

//outputBox class ends here

}

Sample Output:

Enter N:

55

Fibonacci series till 55 is :

0 1 1 2 3 5 8 13 21 34 55

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Programming questions

Question

Which is the most common neurotransmitter in the brain?

Answered: 1 week ago