| Today's lecture covered problem sovling skills. I took a problem: "Take a String from the user and parse the String out so you can print the amount of each vowel in the String." In the problem I created a Driver and a String Parser classes. Notice the main() is a very small method. Most of the work is done in the class. Also I used a try/catch where the user was giving an Integer input. If you put a non-Integer answer the catch will catch the NumberFormatException and print out the error. | |
| Driver.java | The driver instantiates a String Parser. It also takes the user input on whether you want them to continue or not. |
| stringParser.java | Takes in the String and finds the vowels. |