Question
Question 2 2-D character arrays, switch and nested loops You are asked to write a Java program which will produced patterned squares. The size of
Question 2 2-D character arrays, switch and nested loops
You are asked to write a Java program 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 even rows 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.
Welcome to the Decorated Square Drawing Program!I What type of square would you like? 1 Full square 2 - Hollow square 3AnX 4- Horizontal Bars 5 - Vertical Bars 6 Diagonal Bars 7 Integer Filled Square 8 Checkered (must be a multiple of 4) 9 - Quit Enter your choice (1 to 9): Sorry! That is an illegal choice Enter your choice (1 to 9): How many rows and columns (min 4 & max 20)? which character do you want to fill your square with?e Here is your pattern 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 Integer Filled Square 8 Checkered (must be a multiple of 4) 9 - Quit Enter your choice (1 to 9): 2 How many rows and columns (min 4 & max 20)? Which character do you want for the borderStep 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