I need to write a program to output an ASCII art pattern. The size of the pattern should change dynamically based on class constants.
It should look like this:
Number of boxes: 4
Width of boxes: 6
Height of boxes: 3
+------+------+------+------+
| | | | |
| | | | |
| | | | |
+------+------+------+------+
public class testing {
public static void main(String[] args) {
for (int height = 1; height <= 2; height++) {
System.out.println("");
for (int box = 1; box <= 4; box++) {
System.out.print("+");
// System.out.print("|");
for (int width = 1; width <= 6; width++) {
System.out.print("_");
}
}
}
}
}