Question
Method: fillArray the method accepts a non-null String variable as an argument. Return a char array that has been filled from the String passed to
Method: fillArray
the method accepts a non-null String variable as an argument. Return a char array that has been filled from the String passed to the method, each element set to the corresponding character in the string. public char[] fillArray(String var)
Method: stringArray
the method accepts an array of chars as an argument if the chArray is null or length is zero, returns an empty string if chArray is not null, return a single string with each of the characters in the array in the string. public String stringArray(Char[] chArray)
Method: productMatrix 0
Method: sumOfSquares the method accepts an array of ints if the array is null or of size zero, return 0 if the size of the array is greater than or equal to 1 return an int equal to the sum of the square of each element of the array public long sumOfSquares(int[] intArray)
Method: incPosArray the method accepts an array of ints if the array is null or of size zero, simply return if the size of the array is greater than or equal to 1 increment each positive element of the array, leaving the negative elements and the elements equal to zero set to their incoming values public void incPosArray(int[] intArray)
public Q3{
/* * Method: fillArray */ public char[] fillArray(String var){ System.out.println( "fillArray not implemented"); return null; } /* * Method: stringArray */ public String stringArray(char[] chArray) { System.out.println( "stringArray not implemented"); return null; } /* * Method: productMatrix */ public int[][] productMatrix(int n){ System.out.println( "productMatrix not implemented"); return null; } /* * Method: sumOfSquares */ public long sumOfSquares (int[] intArray) { System.out.println( "sumOfSquares not implemented"); return -1; } /* * Method: incPosArray */ public void incPosArray (int[] intArray) { System.out.println( "incPosArray not implemented"); return; } public static void main (String[] args) { Q3 q3 = new Q3(); //Put your test code here }
}
how do you construct these methods?
Step by Step Solution
There are 3 Steps involved in it
Step: 1

Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2

Step: 3

Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started