Question: Part 1: In the QuizMethods.java class create the following 2 static methods: a method that takes an array of integers as a parameter and returns

 Part 1: In the QuizMethods.java class create the following 2 static

methods: a method that takes an array of integers as a parameter

Part 1: In the QuizMethods.java class create the following 2 static methods: a method that takes an array of integers as a parameter and returns true if all the integers in the array are even and returns false otherwise. Checks an array of integers to see if all elements of the array are even. @param data an array of integers to check @return true if the array contains only even numbers; false otherwise */ public static boolean checkAllEven (int[] data) { AND a method that takes as parameters an array of integers and an integer and returns the number of times that integer occurs in the array of integers. * Given an array of integers and an integer, return how many occurrences of the integer appear in the array. * @param data an array of integers Gparam target an integer to search for in the array * @return number of times target appears in data public static int countOccurrences (int[] data, int target) Part 2: In the class called Quiz6Main java you will only need a main() method. In the main() method create an int array and put some numbers into the array. For example, maybe you will create your array as follows: int[] myArray = {42, 2, 13, 2, 7, 99, 142}; Next, print your array You will then pass this array to the 2 methods which you will create in the Quiz6Methods.java class. The methods in QuizMethods.java will return results back to main(and you should then print those results. Make sure that your program output is labeled clearly. For example, your program output might look like the output shown below: The array : [42, 2, 13, 2, 7, 99, 142] All even: false The number 2 occu ccurs 2 times in this array. Here is another test of the program: The array : [42, 2, 4, 8, 1421 All even: The number 15 occurs 0 times in this array. true

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!