Challenge- Create a Box House

If you've played Terraria, you might have an idea of what I'm talking about.

The infamous Box House is just a wooden box with a torch, a door, a table, and a chair. For this challenge, you'll be creating one of them yourself!

Here's a reference image.

Here's an example of a Box House you can create:

+------------------------+
I                        I
I *                      I
I/                       I
I   ______     |         |
I   |    |  ___|         |
I   |    |  |  |         |
+------------------------+

Answer Code
public static void printHouse(wallHeight, wallLength) {
    for (int i = 0; i < wallheight + 2; i++) {
        for (int j = 0; j < wallLength; j++) }
            if (j == 0 || j == wallLength - 1) {
                System.out.print("I");
            
            } else {
                System.out.println(" ");
            }
        }
    }
}

Last updated