subject

Write a static method, getbigwords, that gets a single string parameter and returns an array whose elements are the words in the parameter that contain more than 5 letters. (a word is defined as a contiguous sequence of letters.)example: so, if the string argument passed to the method was "there are 87,000,000 people in canada", getbigwords would return an array of two elements, "people" and "canada".another example: if the string argument passed to the method was "send the request to support@turingscraft. com", getbigwords would return an array of three elements, "request", "support" and "turingscraft".i have tried this question numerous times and have tried to apply solutions recomended on chegg, all of which are giving errors. i'm currently using this code; public static string[] getbigwords(string userstring){ string allwords[] = userstring. split("[@,\\s\\.\\? \\! ]"); string strings[] = new string[allwords. length]; int count = 0; for(int i = 0; i < allwords. length; i++){ if(allwords[i].length() > 5){ if(allwords[i].matches("a-za-z]+")) { strings[count] = allwords[i]; count++; } } } string result[] = new string[count]; for(int i = 0; i < count; i++) result[i] = strings[i]; return result; }when i submit the code into my programming lab, i get the following errors; more hints: β‡’ we think you might want to consider using: +=problems detected: β‡’ word 'extremely' not returned in result β‡’ word 'location' not returned in result β‡’ word 'powerful' not returned in result β‡’ word 'charge' not returned in result β‡’ word 'devoted' not returned in result β‡’ word 'elephants' not returned in result β‡’ word 'extremely' not returned in result β‡’ word 'location' not returned in result β‡’ word 'magnitude' not returned in result β‡’ word 'numeric' not returned in result β‡’ word 'personality' not returned in result β‡’ result array length (0) is wrongi've been trying to find a solution to this problem for hours and i'm completely stuck. what am i doing wrong?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:00
11. is the ability to understand how another person is feeling. a. authority b. sympathy c. empathy d. taking a stand
Answers: 1
question
Computers and Technology, 22.06.2019 19:20
Consider the following code snippet: #ifndef cashregister_h#define cashregister_hconst double max_balance = 6000000.0; class cashregister{public: cashregister(); cashregister(double new_balance); void set_balance(double new_balance); double get_balance() const; private: double balance[12]; }; double get_monthly_balance(cashregister bk, int month); #endifwhich of the following is correct? a)the header file is correct as given.b)the definition of max_balance should be removed since header files should not contain constants.c)the definition of cashregister should be removed since header files should not contain class definitions.d)the body of the get_monthly_balance function should be added to the header file.
Answers: 1
question
Computers and Technology, 22.06.2019 22:20
Pp 4.1 design and implement a class called sphere that contains instance data that represents the sphere’s diameter. define the sphere constructor to accept and initialize the diameter and include getter and setter methods for the diameter. include methods that calculate and return the volume and surface area of the sphere (see pp 3.5 for the formulas). include a tostring method that returns a one-line description of the sphere. create a driver class called multisphere, whose main method instantiates and updates several sphere objects.
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
Negative methods of behavior correction include all but this: sarcasm verbal abuse setting an example for proper behavior humiliation
Answers: 1
You know the right answer?
Write a static method, getbigwords, that gets a single string parameter and returns an array whose e...
Questions
Questions on the website: 13722360