Question: using only import java.util.Scanner; need help Post Lab Problem #07 (PLP07) Leonardo of Pisa (also known as Leonardo Pisano Bigollo, Leonardo Fibonacci but most often

using only import java.util.Scanner;

need help

Post Lab Problem #07 (PLP07)

Leonardo of Pisa (also known as Leonardo Pisano Bigollo, Leonardo Fibonacci but most often simply called Fibonacci) was one of the best known mathematicians of the middle ages. He wrote the https://en.wikipedia.org/wiki/Liber_Abaci (Links to an external site.)Links to an external site. (the Book of Calculation) in 1202 which explained the Hindu-Arabic weighted positional notation scheme to Western mathematicians. In the Liber Abaci Fibonacci posed a word problem that might be solved through the use of simple addition employing the Hindu-Arabic system... "If a pair of rabbits is placed in an enclosed area, how many rabbits will be born there if we assume that every month a pair of rabbits produces another pair, and that rabbits begin to bear young two months after their birth?" -- from The Fibonacci Sequence, Spirals and The Golden Mean https://math.temple.edu/~reich/Fib/fibo.html (Links to an external site.)Links to an external site. at Temple University A variation on the number sequence Fibonacci envisioned to solve that problem -- 0, 1, 1, 2, 3, 5... -- has become associated with definitions of beauty and ratios unrelated to mathematics (but as it turns out, very useful in Computer Science).

The problem reads: Prompt the user for the number of values in Fibonacci the user wants to see. The sequence may be produced by using the last two values in the sequence to produce the next value. Start the sequence with 0 and 1. The next value in the sequence would be 1 (= 0 + 1). The next value would be 2 (= 1 + 1) and the value following would be 3 (= 1 + 2). A typical session might look like this... How many Fibonacci numbers do you want to see? 9 The Fibonacci sequence for 9 numbers is... 0, 1, 1, 2, 3, 5, 8, 13, 21 Thank you

Notes:

Develop your solution using Java.

Use the prompt and reply sequence to determine the number of values in the sequence to display (make a minimum of 12).

Consider the most appropriate data type to use for the values in the sequence. Consider and implement any tests necessary to insure the user response is valid (ie, numeric and greater than or equal to 12).

Hand calculate your sequence to confirm your program works properly. Append your prompt & reply sequence with the sequence produced at the end of your program using the comment convention for Java.

Submit the source program and the test data set document for credit.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!