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 9 dt reini7.I
Create a Scanner to read input from the keyboard.
Create an String Array reference for 5 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 5 Strings (readLine()).
Once back in main, print out the original String Array using the enhanced for loop. I59
Call findAverageLength with the Array (mystrings) reference variable as the parameter.
Sum up the lengths of the 5 strings and divide that by 5. 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 5 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 5 strings in the array
 StringArray In main: wolsd msigorq 9 dt reini7.I Create a Scanner

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!