Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

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

Readings In Database Systems

Authors: Michael Stonebraker

2nd Edition

0934613656, 9780934613651

More Books

Students also viewed these Databases questions