Question: Write a static method named xo that accepts an integer size as a parameter and prints a square of size by size characters, where all

Write a static method named xo that accepts an integer size as a parameter and prints a square of size by size characters, where all characters are "o" except that an "*" pattern of "*" characters has been drawn from the corners of the square. In other words, on t he first line, the first and last characters are "x") on the second line, the second and second-from-last characters are y, and so If 0 or less is passed for the size, no output should be produced. on The following table lists some calls to your method and their expected output: xo(3); XO(8); xo(1); Xo(0); xo(5); Call XOX X x000000x Example Output XOOOX OXOXO OXO XOX OXOXO 000xxooo XOOOX OOOXXOO0 X000000x
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
