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

This program outputs a downwards facing arrow composed of a rectangle and a righ

ID: 3786319 • Letter: T

Question

This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defined by user specified arrow base height, arrow base width, and arrow head width. Modify the given program to use a loop to output an arrow base of height arrow Base height. Modify the given program to use a loop to output an arrow base of width arrow Basewidth. Use a nested loop in which the inner loop draws the "s, and the outer loop iterates a number of times equal to the height of the arrow base. Modify the given program to use a loop to output an arrow base of head arrow Basehead. Use a nested loop in which the inner loop draws the "s, and the outer loop iterates a number of times equal to the height of the arrow head. Modify the given program to use a loop to output an arrow base of width arrow Basewidth. Use a nested loop in which the inner loop draws the "s, and the outer loop iterates a number of times equal to the height of the arrow width.

Explanation / Answer

Scanner scnr = new Scanner(System.in); int arrowBaseHeight = 0; int arrowBaseWidth = 0; int arrowHeadWidth = 0; int i = 0; System.out.println("Enter arrow base height: "); arrowBaseHeight = scnr.nextInt(); System.out.println("Enter arrow base width: "); arrowBaseWidth = scnr.nextInt(); System.out.println("Enter arrow head width: "); arrowHeadWidth = scnr.nextInt(); //Your code above | Below is the modified code String ast = ""; //String ast will contain how many asterisk we want for the base width; for (int x = 1; x
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote