prompt the user for an int between an upper and


Prompt the user for an int between an upper and lower boundary. Reuse the validateInput() method from project to validate if the input is in bounds. If it is not, print an error that the given input is not greater than the lower bound and not less than the upper bound, then end the program. If input is in bounds, create an array of type String of that length. Loop the length of the array. For each array element, generate a random number from 0 to 9. Reuse the convertInput() method from project 2 and put into each array element the String value that corresponds to the random number.

Prepare a second loop that prints the contents of the array as array index followed by the array index contents. Use the escape character for the tab stop to line up the output. Your upper and lower boundaries should be constants. Use 1 as lower and 20 as upper boundaries.

Project uses: Your static methods will be: public static boolean validateInput(int); // returns true if the length of the int parameter is 1 digit long. Returns false otherwise. public static String convertInput(int); // returns a string of the word that represent the integer passed as an argument.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: prompt the user for an int between an upper and
Reference No:- TGS0442956

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)