Primary Response: Within the Discussion Board area, write 200–250 words that respond to the following questions with your thoughts, ideas, and comments. This will be the foundation for future discussions by your classmates. Be substantive and clear, and use examples to reinforce your ideas.

For this Discussion Board, please complete the following:

Almost all the programming languages provide a concept called loop, which helps in executing one or more statements up to a desired number of times to accomplish one or more tasks. For example, you may use a loop statement to write a program to print out the assignment grade for all of the students in a large class. Assume that you are the programmer hired by a bank to write a program for its automated teller machines (ATM). Give an example where you want to use a loop statement to accomplish a task in the program, and answer the following questions:

In that example, can you accomplish the same task without using a loop statement? Why or why not?

What are the benefits to using a loop statement for that example?

 ORDER THIS PAPER NOW

Discussion board 4

In that example, can you accomplish the same task without using a loop statement? Why or why not?

We can accomplish the same task but we will be needing 100 line of codes and you need to manually enter per line and it’s more hassle than the looping.

What are the benefits to using a loop statement for that example?

Loops are critical components of applications. Indeed, all but the most basic programs have at least one loop. Loops are really handy and may save you a lot of time as a developer. Loops save you from writing the same code again if you want something to happen repeatedly (Alessandro, Anup & Harrold, 2018). As an example, suppose I asked you to count to 100 and informed you that you might add 1 to the previous number and that you had to begin at 1. Then I’ll ask you what the next number is, and you’ll respond with the number +1. Then I’ll ask you what the next number is again, and you’ll respond with the number +1. Now, repeating each time that you add one number to the previous number up to 100 is tedious. Thus, a more efficient and straightforward method you proposed was to just continue the process of adding one to the number until we reach 100. Simply said, you accomplished the same thing with a single statement. That is the strength of the loop. It can loop through the same code several times, saving you from having to write it over (Voelta & Ratiu, 2018).

References

Alessandro Orso, Anup Rao, and Mary Jean Harrold. (2018). A Technique for Dynamic Updating of Java Software. In Proceedings of the IEEE International Conference on Software Maintenance (ICSM). pp 649.