Just need help based on the description below, thank you!
The following pseudocode represents three modules of code thatrequire testing. To implement and complete this exercise, implementthis code in Java and complete two testcases for each of the modules:
// given an array of integers, and a number of times to look, return the minimum value public static int Example1(int[] arrayOfInts, int n) { } int currmin = 100; for (int i=0; i<n;i++) { } } // given an array of integers, print out each value public static void Example2(int[] arrayOfInts) { } return currmin; if (arrayOfInts < currmin) currmin = arrayofInts; for (int i = 0; i < 100; i++) { } // given two integer search values if they are equal to the values in the array Console.WriteLine(arrayOfInts.ToString()); public static void Example3(int[] arrayofInts) { int a = 10; int b = 5; bool found= FALSE; for (int i = 0; i < sizeof(arrayOfInts); i++) { if(a == arrayOfInts) { } Console.WriteLine ("The value of a found in int array."); found= TRUE; Else if( b==arrayOfInts) { Console.WriteLine ("The value of a was found in int array."); found =TRUE; } If (found= FALSE) Console.WriteLine("None of the search values were found.");
Just need help based on the description below, thank you! The following pseudocode represents three modules of code that
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am