This is the main class of the program. Inside
the main class, we list out the possible options that the user can select
from. Here I used a do-while loop to continuously loop out the option until
the user selects the EXIT option. The option menu will bring back to the
screen each time a selection is done. In addition,
I used try-catch to handle any InputMismatchException, basically if the user
enters anything besides an Integer, it will catch it and prints out a
message Invalid
Input and the program will exit.
ClickHere to download IntDriver.java
ClickHere to download SortedArray.java
Note: If you are wondering what is package arrayproject, don't
worry about that. If you are confused by them, remove both of the package
arrayproject from your file. However, if you want to learn about it, you can
google or yahoo it.