Question
public static String getRectangle(int maxRows, int maxCols, char symbol) - This method returns a string with a rectangle that has maxRows and maxCols, using the
public static String getRectangle(int maxRows, int maxCols, char symbol) - This method returns a string with a rectangle that has maxRows and maxCols, using the symbol character. The method will return the special value null (it means nothing or no address) if maxRows or maxCols (or both) are less than 1; in this case no diagram will be generated. The method MUST not rely on System.out.println(). For example, calling DrawingApp.getRectangle(6, 9, '*'); will generate the string:
Write a Java program to match the result as the image shows also meet the requirement of the descption.
* * * * * * * * * * * * * * * * * * * * * * * * * * 12 x 4 5 6Step 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