Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 2 Lnai 9285

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Joao Gama ,Alipio Jorge ,Carlos Soares

1st Edition

3319235249, 978-3319235240

More Books

Students also viewed these Databases questions

Question

=+What sanctions are available to employers

Answered: 1 week ago

Question

=+ If strikes occur, are they legally regulated?

Answered: 1 week ago

Question

=+industrial action Under what circumstances can unions strike?

Answered: 1 week ago