Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

On a daily basis, we work with any number of interfaces that use iteration to op

ID: 3597640 • Letter: O

Question

On a daily basis, we work with any number of interfaces that use iteration to operate. For instance, on an alarm clock, pressing the snooze button resets the alarm to go off again in a set amount of time; turning the alarm off is what "breaks" the loop. Discuss at least one real-world interface for which you can explain how iteration is used. Your example can be brief, but should include some discussion regarding initialization (state of the world when the iteration starts), test to continue (what makes the iteration continue) and incrementation (how do we work toward an end to the iteration)? Feel free to use psuedocode to illustrate your ideas.

Explanation / Answer

This is really an intresting question,Facebook would be the best example here.

For example when you try to view your frineds in the friends list , you will be able to see their profie photo,name and profile link and so on.For this happen we need code to iterate over each friend in your list to display corresponding data.

Sample code snippet:

This will make sure that loop iterates till the end of your friends list and will brek once it reaches the last one in your list.

Thanks for the opportunity.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote