Question: StringArray In main: wolsd msigorq 9 dt reini 7 . I Create a Scanner to read input from the keyboard. Create an String Array reference
StringArray
In main:
wolsd msigorq dt reiniI
Create a Scanner to read input from the keyboard.
Create an String Array reference for Strings can call it myStrings
Call the method createStringArray with no parameters that returns a reference to an Strings Array that is placed into the mystrings reference variable.
Call populateArray with the String Array myStrings request and read in Strings readLine
Once back in main, print out the original String Array using the enhanced for loop. I
Call findAverageLength with the Array mystrings reference variable as the parameter.
Sum up the lengths of the strings and divide that by Return this value to main.
In main print the value retuned with a statement of what it is
createStringArray method that has no parameters
Creates and returns a reference to the String Array
populateArray method with a void return that accepts a reference to an Array called myArr
Request and read in Strings from the user readLine Add each String to the array
removeEvens method with a double return type, that accepts a reference to a String Array called myArr
I leave the logic to you: You must calculated the average length for all strings in the array
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
