summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Rakefile1
-rw-r--r--src/App.java17
2 files changed, 16 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index aece925..f906359 100644
--- a/Rakefile
+++ b/Rakefile
@@ -24,7 +24,6 @@ task publish: [:clean, :test, :doc, :repackage]
task :run do
sh "mvn package"
sh "java -cp target/assignment2*.jar ca.mokhan.comp268.App"
- sh "java -cp target/assignment2*.jar ca.mokhan.comp268.App"
end
task :run1 do
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;
+ }
+ }
}
}