Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MUST USE THE PROVIDED SKELETON AND SAME FORMAT Multiplication Table (15 pts). This program will display a small multiplication table for numbers up to 5.
MUST USE THE PROVIDED SKELETON AND SAME FORMAT
Multiplication Table (15 pts). This program will display a small multiplication table for numbers up to 5. This program reviews for loops, nested for loops, and while loops. It should do the following Prompt the user to enter a number 1 through 5. This is the size of the multiplication table. If a user puts in a number greater than 5 or a negative number, your program tells them they have input an invalid table size and prompts again. Create the multiplication table .Allow the user to create another table. If the user enters 0 for the size of the table, then stop the execution of your program Here is a strategy to assist in working through this assignment: Step 1. Download the skeleton file called MultiplicationTable.java to use as a starting point. This code compiles and prompts the user to enter the size of the table 1 through 5. The skeleton code also sets up the top headers of your table. Review the code and variables used. Execute the code with values 1 through 5 to evaluate Step 2. Implement the rest of the multiplication table (highlighted in the example output) as indicated by comments in the skeleton file. Use a nested for loop. Hint: In your System.out.print statements, you might use "t" to tab to the next tab position, so that the information is displayed neatly in columns. Your output must match the output given below Step 3. When you have Step 2 executing correctly, now add the data validation for the table size. A size is invalid if it is greater than 5 or a negative number lf the user Step 4, when Step 3 is executing correctly, add a while loop to allow the user to create another table. enters 0 for the size of the table, then stop the execution of your program Example output. Submit this test data with your source code Please enter the table size from 1 to 5 (0 to quit) 3 21 2 Please enter the table size from 1 to 5 (0 to quit) 10 Sorry, not a valid table size from 1 to 5. Try again Please enter the table size from 1 to 5 (0 to quit): 0 Done
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