There is a trend in programming to make coding easier and more automatic. Some welcome this trend, but others are concerned about future programmers not learning necessary programming fundamentals if programming is no longer required. For instance, without understanding how looping and variable initializations work, how easily would an individual be able to find a logic error in a looping process? Do you think programmers of the future should still learn programming fundamentals, even if coding is no longer required? Why or why not?
1.Starting with this provided code, add the following functionality: Replace hardcoded strings “Zero”, “One”, “Two”, “Three” in the ArrayList based on user typed input (use Scanner or JOptionPane classes). The user will be prompted for the String to be stored in the ArrayList and then hit enter. The user will be able to continue to add items to the ArrayList until they just hit enter without typing anything. Once the user does this (hits enter without typing anything), the program will display all of the elements of the ArrayList, both the index and String values, in a table. It will do this via a single loop making use of an iterator method. 2. Starting with this provided code, add the following functionality: Use a Try/Catch block so that the exception is caught and the program exits a bit more gracefully. Save this file as TryCatch.java. (Be sure to rename the Public Class accordingly.) Starting with the provided code again (without the Try/Catch block), fix the code so that ...
Comments
Post a Comment