Home /
Expert Answers /
Computer Science /
please-use-java-1-height-of-the-box-2-width-of-the-box-3-border-character-4-interior-character-y-pa113
(Solved): PLEASE USE JAVA 1. height of the box 2. width of the box 3. border character 4. interior character Y ...
PLEASE USE JAVA
1. height of the box 2. width of the box 3. border character 4. interior character Your program must collect the inputs in the order described above. With these inputs, your program must print out a box made of the border and interior characters, and with the specified height and width. Here are some examples of what the program should look like when it runs with several different inputs: Example 1 Enter height : 5 Enter width \( : 7 \) Enter border : \( x \) Enter interior: xxxxxxx xo0000x xo0000x xo0000x xxxxxxx Example 2 Enter height : \( \quad 3 \) Enter width \( \quad: 4 \) Enter border : Enter interior :
For the given inputs, make sure that your program output looks exactly like the example above (includi spelling, capitalization, punctuation, spaces, and decimal points) Hints and Helpful Info - It can help to break this process down into steps. - To print the box, you must print a number of lines of text (specifically height lines of text) - For each line of text that you print, you must print a number of charaoters (Specifically width characters) - Each character is either a border character or an interior character - You can use a loop to iterate through each line of the box - You can use a nested loop to iterate through each character in this line of the box - You can use a decision statement to decide to print either a border character or an interior character - For example, - if the current line is the first line, then the printed character will be the border character - if the current character is the first character on this line, then the printed character will be the border character - etc. - After each line, you can print a newline character to start the next line There are other ways to structure your solution. Please feel free to experiment with and explore different possibilities.