package class9_Lab_Command_start; import java.util.Scanner; public class ClassDriver { public static void main(String[] args) { Schedule schedule = new Schedule(); schedule.add(new Course("SE2811", 1, 10, 41.5)); schedule.add(new Course("CS2910", 2, 12, 23)); schedule.add(new Course("SE2030", 3, 11, 30.5)); schedule.add(new Course("HU255", 4, 11, 32.5)); Scanner in = new Scanner(System.in); int index = promptForIndex(in, schedule); while (index != -1) { if (index != -2) { //TODO: Support undo/redo schedule.remove(index); } else { //TODO: Support undo/redo } index = promptForIndex(in, schedule); } } protected static int promptForIndex(Scanner in, Schedule list) { list.printAll(); System.out.println("Please enter the index of the course you would like to remove. (-1 to" + " exit, -2 to undo)"); return in.nextInt(); } }