From 44e29be9318ede77de14dca25c4cedd608045c07 Mon Sep 17 00:00:00 2001 From: mo Date: Sun, 2 Jun 2019 22:05:13 -0600 Subject: update main main to choose which exercise to run --- src/App.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/App.java') diff --git a/src/App.java b/src/App.java index f7195fe..16c2a41 100644 --- a/src/App.java +++ b/src/App.java @@ -1,7 +1,22 @@ package ca.mokhan.comp268; +import Q1.*; +import java.util.Scanner; + public class App { public static void main(String[] args) { - System.out.println("Hello World!"); + Scanner in = new Scanner(System.in); + while (true) { + System.out.println("Choose exercise: (1-10)"); + switch (in.nextInt()) { + case 1: + Q1.ReversedSentence.main(args); + break; + default: + System.out.println("Bye"); + System.exit(0); + break; + } + } } } -- cgit v1.2.3