Question: You are asked to write a Java program using 2D character arraysm switch and nested loops which will produced patterned squares. The size of the

 You are asked to write a Java program using 2D character

You are asked to write a Java program using 2D character arraysm switch and nested loops which will produced patterned squares.

The size of the square must be between 4 and 20 inclusive

The choices are as follows:

1. A full square you need the size of the square and the character to fill the square with.

2. A hollow square - you need the size of the square and the character for the border around the square.

3. An X - you need the size of the square, the character for the X and the character to fill the spaces around the X.

4. A square with horizontal bars - you need the size of the square, the character for the evenrows and the character for the odd rows.

5. A square with vertical bars - you need the size of the square, the character for the even columns and the character for the odd columns.

6. A square with diagonal bars - you need the size of the square, the character for the even diagonals and the character for the odd diagonals.

7. An integer filled square you need the size of the square and the starting integer value.

What type of square would you like? 1 Full square 2 Hollow square 3- An X 4 - Horizontal Bars 5 - Vertical Bars 6 Diagonal Bars 7 Integerl Filled Square 8 Checkered (must be a multiple of 4) 9 Quit Enter your choice (1 to 9): 11 Sorry! That is an illegal choice. Enter your choice (1 to 9): 1 How many rows and columns (min 4 & max 20) which character do you want to fill your square with? Here is your pattern What type of square would you like? 1 Full square 2 Hollow square 3- An X 4- HorizontalBars 5- Vertical Bars 6 Diagonal Bars 7 Integer Filled Square 8 Checkered (must be a multiple of 4) 9 Quit

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!