/************************************************** * Author: Your name please * Date: 26 Apr 2021 **************************************************/ import java.util.ArrayList; public class Lists { public static void main(String[] args) { /*test drive your methods here. Since everything is static, * you can call them directly.*/ } /** * This returns a list with all of the even-indexed items * of a list in their index order. * @param list The list we are sampling from * @return the items in the list we passed in in index order. * The original list is NOT modified. */ public static ArrayList everyOther(ArrayList list) { return new ArrayList(); } /** * This reports the second-highest item in the list in * alphabetical order, case-insensitive. It does not modify * the original list. * @param list The list we are searching * @return The second-highest item in the list in alphabetical order, * case-insensitive. */ public static String secondLargest(ArrayList list) { return ""; } /** * This returns a new list with all items in the first half of * the alphabet in their original order. This is case-insensitive. * It does not modify * the original list. * @param list The list we are filtering * @return a new list consisting of items int he first half of the * alphabet from the list we passed in in their original order. * case-insensitive. */ public static ArrayList firstHalf(ArrayList list) { return new ArrayList(); } /** * This returns a new list that is truncated at the first instance * of the string chop, which will appear at the end of this * new list. * @param chop The string we are chopping at. * @param list The list being chopped. * @return returns a copy of the list chopped at chop. * If chop does not appear, it returns the original list. */ public static ArrayList chopAt(ArrayList list, String chop) { return new ArrayList(); } /** This takes a list of strings and upper-cases them all * in-place. It modifies the original list. * @param list The list being upper-cased. */ public static void capitalOffense(ArrayList list) { } }