public class MasterControl { static InputInterface input = new Input(); static SwapStoreInterface ss = new SwapStore2(); static ShiftInterface shift = new Shift(); static SortInterface sort = new Sort(); static OutputInterface output = new Output(); public static void main(String[] args) { String filename = "test.txt"; if (args.length > 0) { filename = args[0]; } input.read(ss, filename); shift.shift(ss); sort.sort(ss); output.output(ss); } }