Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Beginning VB 2008 Databases

Authors: Vidya Vrat Agarwal, James Huddleston

1st Edition

1590599470, 978-1590599471

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago