Question: Programming Assignment #6-CountingLoops This week you will be writing 2 main programs. They will BOTH doing the SAME thing (same prompts and same output), but

 Programming Assignment #6-CountingLoops This week you will be writing 2 main
programs. They will BOTH doing the SAME thing (same prompts and same

Programming Assignment #6-CountingLoops This week you will be writing 2 main programs. They will BOTH doing the SAME thing (same prompts and same output), but one will use a while loop and the other will use a for-loop. Prompting user can done using Scanner or JOptionPane, your choice. Write a main program within a new Class called CountingWhile that will Step 1: Prompt the user to enter the message to be printed multiple times Print "Enter the message you want to print?" Step 2: read the input message from the keyboard. Store the input into a variable called message. What data type do you think it should be? Step 3: Prompt the user to enter the number of times the message should be printed. Print "Enter how many times you want your message to be printed. Enter value from 1-500". Step 4: Store the input into variable called numRows. What data type do you think it should be? Step 5: validate the number entered, numRows, to make sure it is 1-500 Step 6: If the number is not in 1-500 then print an error message to the console that the number was not between l-500. Print Number was not between 1-500 Try Again Then prompt the user to enter the number of times the message should be printed. Print Enter how many times you want your message to be printed Enter value from 1-500" Step 7: using a while loop, repeat the validation loop until the user enters a number from 1-500. Step 8: using a while loop or a do-while loop print the message as many times as requested by the user numRows times. Step 9: print message row as Row XX

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!