Question: Need help with assignment in java IDE I need to add the following methods to my main.java: *The method called stringsBeginningWith should print all Strings

Need help with assignment in java IDE I need to add the following methods to my main.java:

*The method called stringsBeginningWith should print all Strings from the list that begin with c. In addition to the Stream methods, you can use the methods of the String class and System.out.println as part of the Stream method calls.

*The method called lowerAlphabetical should convert all Strings in the list to lowercase and print them out in alphabetical order. In addition to the Stream methods, you can use the methods of the String class and System.out.println as part of the Stream method calls.

*The method called tripleOddAverage should find the average of all odd integers in the list after they have been tripled. In addition to the Stream methods, you can use System.out.println as part of the Stream method calls.

*The method called findMinimum should find the minimum Integer in the list. You must use reduce to do this and cannot make use of the min method. In addition to the Stream methods, you can make a single call to System.out.println after the resulting minimum Integer has been found.

*The method called findMultiples should collect the first n multiples of the start value into a new List. As an example, if your start value is 2 and n is 4, your list should contain 2, 4, 6, and 8. You will need to look into the iterate and limit methods (part of the Stream API) in order to do this. After the new list has been created, use a separate Stream to print all the elements of the new list. You can use the method System.out.println as part of the Stream method calls.

Here is my main.java so far

import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream;

public class Main {

public static void stringsWithBeginning(List strings, char c) {

} public static void lowerAlphabetical(List strings) {

} public static void tripleOddAverage(List ints) {

} public static void findMinimum(List ints) {

} public static void findMultiples(int start, int n) {

}

public static void main(String[] args) { stringsWithBeginning(Arrays.asList("apple", "banana", "artificial", "trust", "antique"), 'a'); lowerAlphabetical(Arrays.asList("ChErRy", "BaNaNa", "DrUmStIcK", "TrUsT", "AnTiQuE")); tripleOddAverage(Arrays.asList(9, 3, 4, 8, 2, 5, 1, 6, 7)); findMinimum(Arrays.asList(91, 13, 24, 38, 28, 51, 11, 26, 17)); findMultiples(14, 5); } }

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!