Purchase Solution

Looping and Case Statements

Not what you're looking for?

Ask Custom Question

1. When using Case statements, what would happen if you did not "Break?" Please give an example and explain.

2. Where, in your everyday life, would you use all of the looping techniques,

? Pseudocode for looping structures
? Operators continued
? The while loop
? The do while loop
? The for loop
? break and continue statements
? System calls

Give examples. (Please do not use any computer languages in your examples)

Example: While hair is dirty, Shampoo hair - Apply small amount of shampoo to hair, lather, rinse, and then repeat until clean. (Please be more detailed)

Purchase this Solution

Solution Summary

462 words give real life examples of loop behaviour to illustrate the technique in computing.

Solution Preview

1. If the "break" statement is not used in a case-switch structure, all the options will be gone through and evaluated instead of just the single, relevant one, which will render the program inefficient.

2. Pseudocode for looping structures
Suppose that I have to drive from my house to the post shop, bank, local library, children's crèche, a friends place and my mom's house. I do not exactly know the way (as I will check it on my GPS system when driving), but I have a general idea what way to go to visit all these places and I make a rough mental map in my mind about driving directions. This is an example of a pseudo code.

? ...

Purchase this Solution


Free BrainMass Quizzes
Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

C# variables and classes

This quiz contains questions about C# classes and variables.

Basic Networking Questions

This quiz consists of some basic networking questions.

Javscript Basics

Quiz on basics of javascript programming language.