Question: Java question please Extra Credit 5% extra credit can be earned by completing the following challenge in the class with the main () method, add

Java question please
 Java question please Extra Credit 5% extra credit can be earned

Extra Credit 5% extra credit can be earned by completing the following challenge in the class with the main () method, add a method called averageLength that takes any number of String parameters. The method should compute and return the average length the strings as a double. If no strings are passed to the method, it should return 0. You will receive up to 2% extra credit if you complete the method correctly with no restrictions. You will receive up to 5% extra credit if you are able to complete the method using only a single Java statement. The image below shows some example calls to the method and the correct output: System.out.printIn(averageLength("abc", "", "abcdefg", "length", -1234567890")); 40 System.out.println(averagelengthC abc)); 41 System.out.println averagel ength)); 43 System.out.println(averagel ength(words)); console X String[] words-{ -Charles", "Bryan", "UNT", "School of Engineering and Technology" }; sterminated> StreamExamples (Java Application) A.ibrarylJaval JavavirtualMachines/jdk1.8.0.144.jdk/Contents/Home/birvjava (Sep 21, 2018, 2:402 5.4 3.0 0.0 12.75

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!