Chapter 4. Learning About Data Structures, Decisions, and Loops

When you are creating applications, the source code will need to make decisions, such as: Should you open the file or save the file? And if you open the file, what kind of iterative code is going to read the contents of the file? These sorts of questions are answered by employing data structures, decisions, and loops.

The easiest way to demonstrate how to make a decision is to write a miniature artificial intelligence (AI) system. The AI system will be extremely primitive, but AI is interesting because it makes extensive use of decision and loop constructs. The AI system iterates and makes decisions based on data defined in a neat and orderly custom data structure.

Using the example ...

Get Beginning C# 2008: From Novice to Professional now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.