Java Programming
Parti Recursion 1. you know that in mathematics, the Fibonacci numbers, commonly denoted F.. forma sequence called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from and 1. That is F.-.F-1 and. F.-F. F. The beginning of the sequence is thus 0,1,1,2,3,5,8,13, 21, .. Write a recursive function methods to the brin Fibonacci se b. Write an iterative function methods to find the number in Fibonacci sequence Report the time lapsed by both functions in misconds The time lapsed by a function is the d renge of the time reponder cling the function to the time reported before calling the function long start System.current L LES(): Il your function call long Finish Systen.current LLIS(); long timelapsed finish - start; System.out.println(timelapsed. ): Fibonacci Fibonacc sing recursion function: 18234155 retive function 18234355 i "To see the significant difference try big numbers such as: 40 Part I: Lambda Expressions 2. Suppose that a functional interface Array Processor is defined as public interface ArrayProcessor double apply( double[] array ); In the main method of a class that you create later, we defined a function that returns the length of an array of type double and used it as double[] firstList - ( 6, 2.6, 3, 5, 7, 12, 7, 2.5, 10.3, 1.7 ); ArrayProcessor numberOfElements (array) return array.length:): System.out.println(numberor elements.apply(firstList)); //prints 10 Now, using the same concept. tambda, you write and use the following functions a Afunction to find the maximum value in an array A function to find the minimum value in an array A function to find the sum of the values in an array d. A function to find the average of the values in an array Both your programs should have program description header that goes at the top of the file which gives information about the programmer and program 1/ Progra m ello world 1 Description A brief description of the program. What does the 1 progres do not how it does it for example, it uses loops)? Does the pregnant input what kind? What information is output from the program and to where screen or file)