subject

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: 5enter arrow base width: 2enter arrow head width: 4import 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; for (i; i< 0; i++); { 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(); } // draw arrow base (height = 3, width = 2) system. out. println("**"); system. out. println("**"); system. out. println("**"); // draw arrow head (width = 4) system. out. println(""); system. out. println("***"); system. out. println("**"); system. out. println("*"); return; }}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:50
The instruction ishl (shift left integer) exists in jvm but not in ijvm. it uses the top two values on the stack, replacing the two with a single value, the result. the sec- ond-from-top word of the stack is the operand to be shifted. its content is shifted left by a value between 0 and 31, inclusive, depending on the value of the 5 least signifi- cant bits of the top word on the stack (the other 27 bits of the top word are ignored). zeros are shifted in from the right for as many bits as the shift count. the opcode for ishl is 120 (0x78).a. what is the arithmetic operation equivalent to shifting left with a count of 2? b. extend the microcode to include this instruction as a part of ijv.
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best suited for this?
Answers: 2
question
Computers and Technology, 23.06.2019 12:00
If you're using an existing powerpoint presentation that will receive new slides based on a word outline, select the a. slide that will appear after the new slides. b. first slide in the presentation. c. slide that will appear before the new slides. d. last slide in the presentation.
Answers: 2
question
Computers and Technology, 23.06.2019 18:20
What is wi-fi infrastructure? a metropolitan area network that uses radio signals to transmit and receive data a communications technology aimed at providing high-speed wireless data over metropolitan area networks a means by which portable devices can connect wirelessly to a local area network, using access points that send and receive data via radio waves includes the inner workings of a wi-fi service or utility, including the signal transmitters, towers, or poles and additional equipment required to send out a wi-fi signal
Answers: 2
You know the right answer?
This program outputs a downwards facing arrow composed of a rectangle and a right triangle. the arro...
Questions
question
Mathematics, 14.05.2021 21:30
question
Mathematics, 14.05.2021 21:30
question
Mathematics, 14.05.2021 21:30
question
Computers and Technology, 14.05.2021 21:30
question
Mathematics, 14.05.2021 21:30
Questions on the website: 13722363