The goal of this book is to teach you to think like a computer scientist. 1 like
the way computer scientists think because they combine some of the best fea
tures of Mathematics, Engineering, and Natural Science. Like mathematicians,
computer scientists use formal languages to denote ideas (specifically computa
tions). Like engineers, they design things, assembling components into systems
and evaluating tradeoffs among alternatives. Like scientists, they observe the
behavior of complex systems, form hypotheses, and test predictions.
The single most important skill for a computer scientist is problem-solving.
By that I mean the ability to formulate problems, think creatively about solu
tions, and express a solution clearly and accurately. As it turns out. the process
of learning to program is an excellent opportunity to practice problem-solving
skills. That's why this chapter is called "The1 way of the program.''
Of course, the other goal of this book is to prepare you for the Computer
Science AP Exam. We may not take the most direct approach to that] goal,
though. For example, there are not many exercises in this book that are similar
to the AP questions. On the other hand, if you understand the concepts in this
book, along with the details of programming in Ð¡++, you will have all the tools
you need to do well on the exam.