Question: Programming Assignment Extra Credit#1- ForLoopTable The program will do the following: l. Display a message stating what program will do 2. Prompt user for size

 Programming Assignment Extra Credit#1- ForLoopTable The program will do the following:
l. Display a message stating what program will do 2. Prompt user

Programming Assignment Extra Credit#1- ForLoopTable The program will do the following: l. Display a message stating what program will do 2. Prompt user for size of the square table. 3. Print the table, print a in each cell, and printing "X when the Row is the same as the Column. So you should see a diagonal of 'X' characters thru the square. 4. Then prompt the user if they want to run the program again. 5. Sample output is at bottom of this assignment. Here are some steps to take when writing program: Create a new class called ForLoopTable. This will contain the maino program where we will write the code. Step 1: Display a message stating the program will print an 'X' when rowt is same as column Step 2: Display a prompt to user asking to Enter the table size. Print Enter the table row/column size (will be square) Enter value from 1-99 Step 3: store the input in local variable. Step 4: Validate the input. Check to make sure value is 1-99. A while loop or do-while loop will be needed. We have to continue to ask for input from user until a valid input is entered. Step 5: If input is not valid, then continue in a loop until user enters a number in valid range of 1-99. Step 6: After user enters valid value, initialize local variables number of rows and number of columns to be the same. (it's a square) Step 7: then use 2 nested for-loops (one for rows and one columns) to print a table. Step 8: if the row is equal to the column, then print X' Otherwise, print Sounds like an "if-else Step 9: after done printing the table, Prompt the user if they would like to run the program again. Print: "Would you like to run program again? (Enter Y or N) Step 10: If the user entered a Yory, the loop to run the entire program over again. This means the entire program must be in a while loop or a do-while loop

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!