Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

program outputs

All I am getting are ******************************************************* I need some help please

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)

Need assignment help for this question?

If you need assistance with writing your essay, we are ready to help you!

OUR PROCESS

Order

Payment

Writing

Delivery

Why Choose Us: Cost-efficiency, Plagiarism free, Money Back Guarantee, On-time Delivery, Total Сonfidentiality, 24/7 Support, 100% originality

(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)

This is what I have so far……

import java.util.Scanner;

public class DrawHalfArrow {

  public static void main(String[] args) {

     Scanner scnr = new Scanner(System.in);

     int arrowBaseHeight = 0;

     int arrowBaseWidth = 0;

     int arrowHeadWidth = 0;

     int i = 0;

     int j = 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();

    for (arrowBaseWidth = 0; arrowBaseWidth <= 10; arrowBaseWidth++){

      for (arrowBaseHeight = 0; arrowBaseHeight <= 10; arrowBaseHeight++)

         System.out.print(“*”);

      }

    System.out.println();

     return;

  }

}

 
"Looking for a Similar Assignment? Order now and Get 10% Discount! Use Code "Newclient"