Chapter 5 Controlling Program Flow with Decision-Making Statements
Chapter 5 Controlling Program Flow with Decision-Making Statements In This Chapter Writing statements that choose between alternatives Putting statements inside one another Choosing among many alternatives The TV show Dennis the Menace aired on CBS from 1959 to 1963. I remember one episode in which Mr. Wilson was having trouble making an important decision. I think it was something about changing jobs or moving to a new town. Anyway, I can still see that shot of Mr. Wilson sitting in his yard, sipping lemonade, and staring into nowhere for the whole afternoon. Of course, the annoying character Dennis was constantly interrupting Mr. Wilson s peace and quiet. That s what made this situation funny. What impressed me about this episode (the reason why I remember it so clearly even now) was Mr. Wilson s dogged intent in making the decision. This guy wasn t going about his everyday business, roaming around the neighborhood, while thoughts about the decision wandered in and out of his mind. He was sitting quietly in his yard, making marks carefully and logically on his mental balance sheet. How many people actually make decisions this way? At that time, I was still pretty young. I d never faced the responsibility of having to make a big decision that affected my family and me. But I wondered what such a decision-making process would be like. Would it help to sit there like a stump for hours on end? Would I make my decisions by the careful weighing and tallying of options? Or would I shoot in the dark, take risks, and act on impulse? Only time would tell.
Every our account comes with web mail client, free virus scanner, free anti-spam tool, free web templates and much more. For complete list of all our virtual web hosting features check our Virtual Web Hosting section.