package ca.mokhan.comp268; import Q1.*; import java.util.Scanner; public class App { public static void main(String[] args) { Scanner in = new Scanner(System.in); Integer selection = args.length > 0 ? Integer.parseInt(args[0]) : null; while (true) { if (selection == null) { System.out.println("Choose exercise: (1-10)"); selection = in.nextInt(); } switch (selection) { case 1: Q1.ReversedSentence.main(args); break; case 2: Q2.RockPaperScissorsLizardSpock.main(args); break; case 3: Q3.CreditCard.main(args); break; case 4: Q4.RandomSumGame.main(args); break; default: System.out.println("Bye"); System.exit(0); break; } selection = null; } } }