Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

using user input to draw figures. Use static methods. Use local variables. Use a

ID: 441032 • Letter: U

Question

using user input to draw figures. Use static methods. Use local variables. Use arithmetic expressions. Use Scanner to input values. Use a class constant. Use for loops. and calls two methods: 1- Print a sequence of text boxes. The drawBox method on p. 32 prints one text box, but your method should print a user-specified number of text boxes from left to right. This method should ask the user to enter the number of boxes, and then print that many text boxes horizontally. 2- Print a two-dimensional pattern of text tiles described below. This method should ask the user for the width and the height of the pattern, and then print the corresponding patterns. Here is an example of what your output should look like (user input is in bold and underlined): Enter number of boxes: 3 +------+------+------+ | | | | | | | | +------+------+------+ Enter width of pattern: 4 Enter height of pattern: 3 __ __ __ __ / __/ __/ __/ __ __/ __ / __/ __/ / __/ __/ __/ __ __/ __/ __/ __/ / __/ __/ __ / __ __/ __/ __/ __/ You will need to use Scanner to obtain input from the keyboard. You should declare a class constant of type Scanner named CONSOLE at the beginning of your class; you should store new Scanner(System.in) in CONSOLE. See examples in the Chapter 2 lecture notes and in the Laboratory 2 assignment.

Explanation / Answer

You can look here for programs on pattern printing :) http://www.daniweb.com/software-development/java/threads/409541/java-printing-patterns-using-for-loops Cheers! Please rate :)