The project contains three (3) arrays already declared and initialized. You need to implement the following fivemethods in the sections indicated by the comments: Method printo Parameter: An array of integers and number of elements.o Prints out all the elements of the array on the same line and separated by a space. o See format in the sample output shown below. Method printLargesto Parameter: An array of integers and number of elements.o Use a FOR loop to find the largest element in the array.o Call the method print to print out the entire array.o Print the largest element as shown in the sample output. Method printAllEvenso Parameter: An array of integers and number of elements.o Call the method print to print out the entire array.o Use a FOR loop to print out all the even numbers in the array. Numbers should be on the sameline and separated by a space.o See format in the sample output shown below. Method printSumo Parameter: An array of integers and number of elements.o Call the method print to print out the entire array.o Use a FOR loop to calculate the sum of all numbers in the array. o Output the final result in the format shown in the sample output below. Method searcho Parameters: An array of integers, the number of elements, and an integer to search for.o Call the method print to print out the entire array.o Use a WHILE loop to find the element.o The while loop should STOP when the element is found or when the search has reached theend of the array.o Output the final result in the format shown in the sample output below.Thus, you will actually implement 5 void methods. The method print is called by the other 4 and these 4 arecalled by the main method several times each as indicated by the starter project and the sample output below.(Thus, you will not call the method print directly from the main method.)The method main has comments to guide you in implementing the function calls. In the main method: Do NOT add any additional System.out.print statements. Do NOT add any additional code other than the function calls that are specified in the comments.(See next page for sample output.)Sample Output:Array: 23 43 12 45 75 32 12Largest element: 75Array: 34 54 23 34 98 45 76 98 42 48 61 44Largest element: 98Array: 69 62 28 75 28 99 20 45 34 75Largest element: 99Array: 23 43 12 45 75 32 12Even numbers: 12 32 12Array: 34 54 23 34 98 45 76 98 42 48 61 44Even numbers: 34 54 34 98 76 98 42 48 44Array: 69 62 28 75 28 99 20 45 34 75Even numbers: 62 28 28 20 34Array: 23 43 12 45 75 32 12Sum: 242Array: 34 54 23 34 98 45 76 98 42 48 61 44Sum: 657Array: 69 62 28 75 28 99 20 45 34 75Sum: 535Array: 23 43 12 45 75 32 12Number 100 is not in the array.Array: 34 54 23 34 98 45 76 98 42 48 61 44Number 44 is in the array.Array: 69 62 28 75 28 99 20 45 34 75Number 78 is not in the array.Array: 23 43 12 45 75 32 12Number 45 is in the array   https://coastdistrict.instructure.com/courses/67490/files/5564580/download?wrap=1

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

The project contains three (3) arrays already declared and initialized. You need to implement the following five
methods in the sections indicated by the comments:
 Method print
o Parameter: An array of integers and number of elements.
o Prints out all the elements of the array on the same line and separated by a space.
o See format in the sample output shown below.
 Method printLargest
o Parameter: An array of integers and number of elements.
o Use a FOR loop to find the largest element in the array.
o Call the method print to print out the entire array.
o Print the largest element as shown in the sample output.
 Method printAllEvens
o Parameter: An array of integers and number of elements.
o Call the method print to print out the entire array.
o Use a FOR loop to print out all the even numbers in the array. Numbers should be on the same
line and separated by a space.
o See format in the sample output shown below.
 Method printSum
o Parameter: An array of integers and number of elements.
o Call the method print to print out the entire array.
o Use a FOR loop to calculate the sum of all numbers in the array.
o Output the final result in the format shown in the sample output below.
 Method search
o Parameters: An array of integers, the number of elements, and an integer to search for.
o Call the method print to print out the entire array.
o Use a WHILE loop to find the element.
o The while loop should STOP when the element is found or when the search has reached the
end of the array.
o Output the final result in the format shown in the sample output below.
Thus, you will actually implement 5 void methods. The method print is called by the other 4 and these 4 are
called by the main method several times each as indicated by the starter project and the sample output below.
(Thus, you will not call the method print directly from the main method.)
The method main has comments to guide you in implementing the function calls. In the main method:
 Do NOT add any additional System.out.print statements.
 Do NOT add any additional code other than the function calls that are specified in the comments.
(See next page for sample output.)
Sample Output:
Array: 23 43 12 45 75 32 12
Largest element: 75
Array: 34 54 23 34 98 45 76 98 42 48 61 44
Largest element: 98
Array: 69 62 28 75 28 99 20 45 34 75
Largest element: 99
Array: 23 43 12 45 75 32 12
Even numbers: 12 32 12
Array: 34 54 23 34 98 45 76 98 42 48 61 44
Even numbers: 34 54 34 98 76 98 42 48 44
Array: 69 62 28 75 28 99 20 45 34 75
Even numbers: 62 28 28 20 34
Array: 23 43 12 45 75 32 12
Sum: 242
Array: 34 54 23 34 98 45 76 98 42 48 61 44
Sum: 657
Array: 69 62 28 75 28 99 20 45 34 75
Sum: 535
Array: 23 43 12 45 75 32 12
Number 100 is not in the array.
Array: 34 54 23 34 98 45 76 98 42 48 61 44
Number 44 is in the array.
Array: 69 62 28 75 28 99 20 45 34 75
Number 78 is not in the array.
Array: 23 43 12 45 75 32 12
Number 45 is in the array

 

https://coastdistrict.instructure.com/courses/67490/files/5564580/download?wrap=1

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education