Question: Please answer all parts Part 1: Part 2: Part 3: Part 4: Here is Java code for a method mapElements private T,S> List mapElements(List list,

Please answer all parts

Part 1:

Please answer all parts Part 1: Part 2: Part 3: Part 4:

Part 2:

Here is Java code for a method "mapElements" private T,S> List mapElements(List

Part 3:

list, Function mapFct) \{ List newList = new ArrayList (); for (T

Part 4:

next: list) \{ newList.add(mapFct.apply(next)); 3 return newList; \} What should BBBBB be?

Here is Java code for a method "mapElements" private T,S> List mapElements(List list, Function mapFct) \{ List newList = new ArrayList (); for (T next: list) \{ newList.add(mapFct.apply(next)); 3 return newList; \} What should BBBBB be? Here is Java code for a method "functionPlay" I Selects a subset of passed collection per selectFct* / public static List functionPlay ( List elements, Function f(t) \{ List list = new ArrayList (); for (T nextElem: elements) \{ if (selectFct.apply(nextElem)) list.add(nextElem); 3 return newElements; \} What should XXXXX be? Here is Java code for a method "functionPlay" /**Selects a subset of passed collection per selectFct*/ public static List functionPlay ( List elements, Function fct) \{ List list = new ArrayList (); for (T nextElem: elements) \{ if (selectFct.apply(nextElem)) list.add(nextElem); 3 return newElements; 3 What should YYYYY be? Here is some Java code: //Declaration Function fct; //Initialization fct= (aVariable) > aVariable >1000; What should YYYYY be

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!