Your task is to design a method int[] allMatches(int[] values, int size, int a, int b) that returns all values between a and b inclusive in the partially filled array values. For example, if an array a contains 11, 3, 9, 4, 2, 5, 4, 7, 6, 0, then the call allMatches(a, 8, 3, 7) should return an array containing 3, 4, 5, 4, 7. Note that the 6 is not included because it is past the size of the partially filled array. Arrange the pseudocode below in the right order. Not all lines are useful.
ArrayValues. Java Tester.
java for (int v: values)
{ public class ArrayValues public static intti allatches(int[1 values, int size, int, int b) {
} for (int k = 0; k < size; k++) {
int v = values[k]; for (int k = 0; k < size; k++) {
int v = values[k]; for (int v: values) {
result[1] = v; 1++;
}
int count = 0; )
} if (a int[] result = new int[count);

Respuesta :

The program that returns all values between a and b inclusive in the partially filled array values is illustrated below.

What is a program?

A computer program means a sequence or set of instructions that is in a programming language for a computer to execute.

Here, the program based on the information given will be:

count = 0

for each v in values

if a <= v <= b

 count++

result = new int[count]

i = 0

for each v in values

if a <= v <= b

 result[i] = v

 i++

return result

Java code:

public class ArrayRange {

public static int[] allMatches(int[] values, int size, int a, int b) {

 int count = 0;

 for (int i = 0; i < size; i++) {

  if(values[i] >= a && values[i] <= b) {

   count++;

  }

 }

 int result[] = new int[count];

 count = 0;

 for (int i = 0; i < size; i++) {

  if(values[i] >= a && values[i] <= b) {

   result[count++] = values[i];

  }

 }

 return result;

}

public static void main(String[] args) {

 int[] a = {11, 3, 9, 4, 2, 5, 4, 7, 6, 0};

 int[] returnedArray = allMatches(a, 8, 3, 7);

 for (int i = 0; i < returnedArray.length; i++) {

  System.out.print(returnedArray[i] + " "

Learn more about program on:

https://brainly.com/question/1538272

#SPJ1