The Complete C++ Training Course 4/e
Authors: Harvey M. Deitel and Paul J. Deitel
Pages: 1400
Publisher: Addison-Wesley
ISBN: 013100252X
Introduction
The Complete C++ Training Course comes as a box containing two parts: the book “C++ How To Program” and an interactive course on two CD-ROMs titled “C++ Multimedia Cyber Classroom”.
The whole project is devised and written by Deitel father & son, a duo known for training manuals and courses focused mainly on programming languages. The number of Deitel&Deitel technical publications is truly impressive, ranging from C, C++, and Java to wireless programming, .NET programming and web services. They’ve covered virtually all of today’s software development technologies.
About the authors
Harvey M. Deitel, Ph.D., Chairman and Chief Strategy Officer (CSO) of Deitel & Associates, Inc., has 41 years experience in the computing field, including extensive industry and academic experience. He worked on the pioneering virtual memory operating systems projects at IBM and MIT that developed techniques now widely implemented in systems such as UNIX, Linux and Windows. He has 20 years of college teaching experience, including earning tenure and serving as the Chairman of the Computer Science Department at Boston College before founding Deitel & Associates with his son Paul J. Deitel.
Paul J. Deitel, CEO and CTO of Deitel & Associates is a graduate of the MIT’s Sloan School of Management, where he studied Information Technology. Through Deitel & Associates he has delivered C, C++, Java, Internet and WWW courses to industry clients, including Compaq, Sun Microsystems, Boeing, White Sands Missile Range, Dell, NASA, IBM and many other organizations.
Inside the book
The CD-ROM training course is implemented as a web application that runs on top of an Apache server in Windows environment. This setup allows dynamic content and extensive searching capabilities of the material presented. Also, some parts are accompanied by audio material (voice commentaries), and you’ll find plenty of C++ source code as solutions to end-of-chapter exercises.
Besides these implicit differences, both the book “C++ How To Program” and the CD training course are equivalent in content. Therefore, consider the remarks below as referring to both.
The course starts with a standard introduction to computers and C++ programming. In this first chapter the reader gets an idea what programming languages are available today, from structured programming to object technology.
The next few chapters cover what is often called the C subset of C++. These topics include control structures (if/else, while and for loops, switch, etc.), functions (including the concepts of recursion and iteration), arrays, and pointers and strings.
Starting from chapter 6, the authors discuss in detail the proper C++ features: classes, operator overloading, inheritance, polymorphism and templates.
Next, C++ stream input/output is covered, and after that exception handling (error handling techniques) and file processing.
Chapter 16, “Web Programming with CGI”, is somewhat unexpected: the authors added information on web and cgi programming. Here they discuss the http client/server communication and how this fits into the CGI programming model. The implementation is done in C++, of course. Today, the CGI model is not so popular as it’s often replaced by interpreted script technologies such as PHP or ASP – which are simpler and more flexible to use. In this sense, the material may seem a bit outdated. But that’s not the point: a chapter on CGI programming with C++ illustrates the power of the language and exposes the novice programmer to web programming concepts – including multi-tier architecture, HTTP transactions, getting input from HTTP clients, using cookies, etc.
The rest of the book deals with more advanced topics such as dynamic memory allocation, linked lists, usage of the preprocessor, and an overview of the Standard Template Library (STL). STL is a standard part of C++ and it includes several components such as containers, iterators and algorithms. The authors have done a good job in explaining both the theory behind these concepts and how you can put them to use efficiently.
From this outline you could easily conclude that the Deitel course doesn’t offer much novelty in terms of teaching C++. But that conclusion would be very wrong.
C++ books usually start with explaining the C subset within C++, and then introduce the Object Oriented Programming (OOP) features that are the hallmark of C++. That’s perhaps a valid approach for experienced users who are familiar with structured C programming, but it’s certainly not adequate for novice users.
The Deitel course on the other hand starts with OOP techniques from the very beginning. In chapter 1 the authors discuss printing characters and taking input from keyboard by using the output/input stream objects (cout/cin), which is how it should be done by a C++ puritan. The core C features such as control structures and functions are merged and intertwined with C++ throughout the whole course – and I think that’s a very good approach.
Also, at the end of each chapter, the reader will find lots of self-review questions (with answers) and programming exercises pertinent to the chapter’s content. Some of the solutions (source code) to these exercises are found on the CD-ROM version of the course.
Another thing to note is the authors’ fondness of examples or so called case studies: wherever appropriate, the topic is illustrated by a concrete programming example (that is, a problem solved with C++). For instance, when discussing web programming, the authors present a working skeleton of a shopping cart application; or when introducing pointers (a topic often perceived as difficult by novice programmers), they present a card shuffling and dealing simulation.
Object orientation may seem unnatural for both seasoned and novice programmers; OOP is indeed a paradigm shift and it requires a change in defining and solving programming problems.
Because of that, the authors have included a project (case study) involving the development of a simple elevator simulator, using object oriented design. Now, this may seem like a banal idea at first. But this example shows you what kind of problems programmers face in real world situations: from problem and class definition (using the Unified Modelling Language – UML), to identifying class attributes and methods, all the way down to the implementation using all the C++ OOP features.
The elevator simulation project starts at the end of the first chapter with the introduction to UML and object oriented design. At the end of each subsequent chapter, the problem is further analysed, following the reader’s learning curve as she/he proceeds through the course. Finally, the end result is a fully working project with over 1200 lines of code. Besides illustrating the object oriented approach, the whole project clearly shows the complexity behind an apparently banal problem, and how it can be efficiently tackled with object oriented design.
My opinion
As you can see, there’s much more original content in this course than you’d think if you just read the chapters’ titles or an outline. This course could just be the right one to show that object orientation is the most efficient approach to solving software engineering problems. In this sense, it’s an excellent choice for newcomers and for experienced C programmers, as both will find its C++ object oriented approach very convincing and understandable.