Question: i need help with this asap i did it but for horizontal 3 where it has to print 1 0 rows its printing 1 2
i need help with this asap i did it but for horizontal where it has to print rows its printing in java my program is drawing app
public static String getHorizontalBarsint maxRows, int maxCols, int bars, char color char color char color This method returns a
string with a number of horizontal bars that correspond to the bars parameter. To compute the size of each horizontal bar, divide maxRows
by the specified number of bars. The first horizontal bar will use color the second color and the third color If more than bars are
present, we will start again with color If the computed size for a horizontal bar is less than or any of the colors is invalid, the method will
return null and no diagram will be generated. The method MUST NOT rely on System.out.println For example, calling
DrawingApp.getHorizontalBarsRGB; will return the following string:
Calling DrawingApp.getHorizontalBarsRBG; will return the string:
RRRRRRRR
RRRRRRRR
BBBBBBBB
BBBBBBBB
GGGGGGGG
GGGGGGGG
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
