DrawHalfArrow.java Load default template... 1 import java.util.Scanner; 2 3 public class DrawHalfArrow { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); 0; 0; 0; 4 6...


I need help writting this code. And figuring out what to put in for "users input" in the picture down below.


DrawHalfArrow.java<br>Load default template...<br>1 import java.util.Scanner;<br>2<br>3 public class DrawHalfArrow {<br>public static void main(String[] args) {<br>Scanner scnr = new Scanner(System.in);<br>0;<br>0;<br>0;<br>4<br>6<br>int arrowBaseHeight<br>7<br>int arrowBaseWidth<br>8<br>int arrowHeadWidth<br>%3D<br>9<br>10<br>System.out.println(

Extracted text: DrawHalfArrow.java Load default template... 1 import java.util.Scanner; 2 3 public class DrawHalfArrow { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); 0; 0; 0; 4 6 int arrowBaseHeight 7 int arrowBaseWidth 8 int arrowHeadWidth %3D 9 10 System.out.println("Enter arrow base height: "); arrowBaseHeight 11 scnr.nextInt(); 12 System.out.println("Enter arrow base width: "); scnr.nextInt(); 13 14 arrowBaseWidth 15 Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the Develop mode Submit mode second box. Enter program input (optional) If your code requires input values, provide them here.
3.24 Program: Drawing a half arrow (Java)<br>This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defined by user<br>specified arrow base height, arrow base width, and arrow head width.<br>(1) Modify the given program to use a loop to output an arrow base of height arrowBaseHeight. (1 pt)<br>(2) Modify the given program to use a loop to output an arrow base of width arrowBaseWidth. Use a nested loop in which the inner loop<br>draws the *'s, and the outer loop iterates a number of times equal to the height of the arrow base. (1 pt)<br>(3) Modify the given program to use a loop to output an arrow head of width arrowHeadWidth. Use a nested loop in which the inner loop<br>draws the *'s, and the outer loop iterates a number of times equal to the height of the arrow head. (2 pts)<br>(4) Modify the given program to only accept an arrow head width that is larger than the arrow base width. Use a loop to continue prompting<br>the user for an arrow head width until the value is larger than the arrow base width. (1 pt)<br>while (arrowHeadWidth <= arrowBaseWidth)<br>{<br>System.out.println(

Extracted text: 3.24 Program: Drawing a half arrow (Java) 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. (1) Modify the given program to use a loop to output an arrow base of height arrowBaseHeight. (1 pt) (2) Modify the given program to use a loop to output an arrow base of width arrowBaseWidth. 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. (1 pt) (3) Modify the given program to use a loop to output an arrow head of width arrowHeadWidth. 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. (2 pts) (4) Modify the given program to only accept an arrow head width that is larger than the arrow base width. Use a loop to continue prompting the user for an arrow head width until the value is larger than the arrow base width. (1 pt) while (arrowHeadWidth <= arrowbasewidth) { system.out.println("enter arrow head width: "); arrowheadwidth = scnr.nextint(); } example output for arrowbaseheight = 5, arrowbasewidth = 2, and arrowheadwidth = 4: enter arrow base height: 5 enter arrow base width: 2 enter arrow head width: 4 ** ** ** ** ** **** *** ** arrowbasewidth)="" {="" system.out.println("enter="" arrow="" head="" width:="" ");="" arrowheadwidth="scnr.nextInt();" }="" example="" output="" for="" arrowbaseheight="5," arrowbasewidth="2," and="" arrowheadwidth="4:" enter="" arrow="" base="" height:="" 5="" enter="" arrow="" base="" width:="" 2="" enter="" arrow="" head="" width:="" 4="" **="" **="" **="" **="" **="" ****="" ***="">
Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here