< previous page page_viii next page >

Page viii
case studies appear after the chapter discussion, which is interrupted only by short examples.
The Use of C++
Some educators reject the C and C++ languages as too permissive and too conducive to writing cryptic, unreadable programs. Our experience does not support this view, provided that the use of language features is modeled appropriately. That C and C++ permit a terse, compact programming style cannot be labeled simply as good or bad. Almost any programming language can be used to write in a style that is too terse and clever to be easily understood. C and C++ may indeed be used in this manner more often than are other languages, but we have found that, with careful instruction in software engineering, students can learn to use these languages to produce clear, readable code. Many of our colleagues who have switched to C++ in the introductory coursesand model a programming style that is straightforward, disciplined, and free of intricate language featuresreport that students find it no more difficult to learn C++ than Pascal.
Our choice of C++ over C was a very easy one. C++ enforces stronger type checking than C does. C++ all but eliminates the need for preprocessor macros. C++ provides reference types, with the result that parameter passage by reference does not require a premature exposure to pointers as in C. C++ stream I/O is simpler for students to use than the printf and scanf functions. C++ provides linguistic support for data abstraction, information hiding, and object-oriented programming. And, of course, learning the fundamental features of C++ in the first course eliminates a transition from C to C++ in subsequent course work.
It must be emphasized that, although we use C++ as a vehicle for teaching computer science concepts, the book is not a language manual and does not attempt to cover all of C++. One example is our omission of the C++ template mechanism. At the time of this writing, some compiler vendors' implementations of templates were not entirely stable, were not standardized, or were absent. Other language featuresoperator overloading, default parameters, and mechanisms for advanced forms of inheritance, to name a feware omitted in an effort not to overwhelm the beginning student with too much too fast.
Object-Oriented Programming
Currently, there are diverse opinions about when to introduce the topic of object-oriented programming (OOP). Some educators advocate an immersion in OOP from the very beginning, whereas others (for whom this book is intended) favor a more heterogeneous approach in which both structured design and object-oriented design are presented as design tools.
Among schools adopting OOP from the start, the literature discloses mixed results. And what some advocates refer to as OOP might more prop-

 
< previous page page_viii next page >