Question: this is for java Lab 8.2.4 Determine v For All Even Values Select a code solution from the Guided Practice Files provided and modify it



this is for java
Lab 8.2.4 Determine v "For All" Even Values Select a code solution from the Guided Practice Files provided and modify it to load data from a file and find and output a statement indicating if all values in the data file are even, or if at least one is odd. Define and use two methods, one called allEven, which receives a 1D int array and determines true or false if all the elements in the array are even. Also define a method called forAllEven which receives a 2D int array, and loops through all rows of the grid, calling the allEven method for each row, reporting a final result as shown in the examples below. Do three runs, using the three data files provided for input, 2DArrIntC.dat, 2DArrIntD.dat and 2DArrIntE.dat, producing the desired output as shown. r 2DArrintC.dat 6 8 12 8 64 -65 43 79 33 11 3 45 -9 23 55 16 12 34 5 9 -78 54 91 10 4 2 95 16 23 55 64 8 923 4 1 95 -77 68 33 -45 74 -81 99 66 88 11 44 65 22 33 First Data File - 2DArrIntC.dat For each run, the grid should be output first, aligned as shown in columns of width four, right justified. This is followed by a statement announcing the beginning of the search process, "Check for all even elements", and then a statement before the search of each row. For the first row encountered with an odd value, output the statement, "At least on element is odd.", and terminate the search process. For a successful search of all rows, output a final statement saying, "All elements are even." For each run, the grid should be output first, aligned as shown in columns of width four, right justified. This is followed by a statement announcing the beginning of the search process, Check for all even elements, and then a statement before the search of each row. For the first row encountered with an odd value, output the statement, "At least on element is odd., and terminate the search process. For a successful search of all rows, output a final statement saying, All elements are even. The output for each file should exactly match the examples shown. Output for Lab 8.2.4 - Determine v "For All" Even Values 12 C:\Program Files (x86)\Xinox Software CreatorV4LE\GE200... 12 8 64 -65 43 79 33 11 3 45 -9 23 55 16 34 5 9 -78 54 91 10 4 2 95 16 23 55 64 8 923 4 1 95 -77 68 33 -45 74 -81 99 66 88 11 44 65 22 33 check for all even elements Search row 0 At least one element is odd
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
