Answered step by step
Verified Expert Solution
Question
1 Approved Answer
so the answer already given does not fix the issue. a picture of the correct square will be linked, but there should only be a
so the answer already given does not fix the issue. a picture of the correct square will be linked, but there should only be a top line of underscores, and the rest of the underscores will serves as as the bottom line of one line of squares as well as the top line for the next, and the vertical bars should not be double in between, only a single bar. public static char getSquaresint rows, int columns
char square new charrows columns ;
Draw the top line
for int j ; j columns ; j
if j j
squarej;
else
squarej;
Draw the lines between squares and at the bottom
for int i ; i rows ; i
Draw the bottom line
for int j ; j columns ; j
squareij;
Clear the top line for the next row
Arrays.fillsquarei columns ;
return square;
Right now this out puts this
should output this
correct picture of output is provided because the typing is hard
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