Computers and Technology, 08.02.2021 18:40 oomale
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}Example output for arrowBaseHeight = 5, arrowBaseWidth = 2, and arrowHeadWidth = 4:Enter arrow base height:5Enter arrow base width:2Enter arrow head width:4This is what I have: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;System. out. println("Enter arrow base height:");arrowBaseHeight = scnr. nextInt();System. out. println("Enter arrow base width:");arrowBaseWidth = scnr. nextInt();while (arrowHeadWidth >= arrowBaseWidth){System. out. println("Enter arrow head width:");arrowHeadWidth = scnr. nextInt();} // Draw arrow base (height = 3, width = 2)for(int i=0; i < arrowBaseHeight; ++i){for(int j=0; j < arrowBaseWidth; ++j){System. out. print("*");}System. out. println();}// Draw arrow head (width = 4)for(int i=0; i < arrowHeadWidth; ++i){for(int j=0; j < arrowHeadWidth-i; ++j){System. out. print("*");}System. out. println();}return;}}
Answers: 3
Computers and Technology, 22.06.2019 21:30
Write a function named printfloatrepresentation(float number) that will print the floating point representation of a number using the format given below. (sign bit) exponent in binary (assumed bit).significandfor example if the number passed an argument is 71 yourprogram should print (0) 10000101 (1).00011100000000000000000similarly if the number passed to the function as argument is -71 the program should print (1) 10000101 (1).00011100000000000000000
Answers: 3
Computers and Technology, 23.06.2019 13:10
What is domain name system (dns)? allows dynamic ip address allocation so users do not have to have a preconfigured ip address to use the network converts ip addresses into domains, or identifying labels that use a variety of recognizable naming conventions the efficient coexistence of telephone, video, and data communication within a single network, offering convenience and flexibility not possible with separate infrastructures the integration of communication channels into a single service
Answers: 2
Computers and Technology, 24.06.2019 19:30
Which phrase is the best definition of a pivottable a a table containing data that is organized horizontally b a table used to calculate financial pivot values c a tool used to summarize data d a table containing specific formatting
Answers: 1
Computers and Technology, 25.06.2019 06:00
In 2 to 3 sentences, describe how you would change the background of a group of cells
Answers: 1
This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arro...
English, 24.02.2021 03:50
English, 24.02.2021 03:50
English, 24.02.2021 03:50
Computers and Technology, 24.02.2021 03:50
English, 24.02.2021 03:50
Mathematics, 24.02.2021 03:50
Mathematics, 24.02.2021 03:50
History, 24.02.2021 03:50
Mathematics, 24.02.2021 03:50
Physics, 24.02.2021 03:50