Home / Expert Answers / Computer Science / 3-35-lab-program-drawing-a-half-arrow-this-program-outputs-a-downwards-facing-arrow-composed-of-pa134

(Solved): 3.35 LAB*: Program: Drawing a half arrow This program outputs a downwards facing arrow composed of ...



student submitted image, transcription available below
3.35 LAB*: Program: Drawing a half arrow 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) \{ // Prompt user for a valid arrow head value while (arrowHeadwidth <= arrowBasewidth) \{ // Prompt user for a valid arrow head value \} Example output for arrowBaseHeight , arrowBaseWidth , and arrowHeadWidth : Enter arrow base height: 5 Enter arrow base width: 2 Enter arrow head width: 4 495804.3359138.q×3zqy7


We have an Answer from Expert

View Expert Answer

Expert Answer




Here's the modified program split into separate sections according to each requirement:

(1) Modify th...
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe