Question
in Java 2 - Write a program that asks the user to input an integer. Reads input inside a loop and check the input, if
in Java
2 - Write a program that asks the user to input an integer. Reads input inside a loop and check the input, if it is a integer print it out and quit. If it is not integer data re-ask the user to input an integer.
3 - Modify program 2 so that it checks the input - if the string the user entered is 'wombat' have your program print out that they guessed the secret word and are a winner! (for a challenge have it search for a sub string inside the string input)
4 - Write a program that asks the user for a float value. Write a static method the will square that value and return the results. The main will use that method on the input and print out the result.
5 - make a 1-dimentional array and fill it with 10 random integers between 0 and 100. Print out the contents of the array.
6 - Rewrite the array program so that it calls a method to generate the loaded array. It then calls a separate method to print the array.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started