(Solved): Please answer all parts
Part 1:
Part 2:
Part 3:
Part 4:
Here is Java code for a method ...
Please answer all parts
Part 1:
Part 2:
Part 3:
Part 4:
Here is Java code for a method "mapElements" private ?T,S> List <S> mapElements(List <T> list, Function < AAAAA, BBBBB > mapFct) \{ List <S> 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 <T> List <T> functionPlay ( List <T> elements, Function <XXXXX, YYYYY>f(t) \{ List <T> 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 <T> List <T> functionPlay ( List <T> elements, Function <XXXXX, YYYYY> fct) \{ List <T> 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 <XXXXX,YYYYY>fct; //Initialization fct= (aVariable) ?> aVariable >1000; What should YYYYY be?