Preface
Companies choose to utilize C++ for its speed; however, object-oriented (OO) software design leads to more robust code that is easier to modify and maintain. Understanding how to utilize C++ as an object-oriented language is, therefore, essential. Programming in C++ won’t guarantee object-oriented programming (OOP) – you must understand OO concepts and how they map to C++ language features and programming techniques. Additionally, programmers will want to harness additional skills beyond OOP to make code more generic and robust, as well as employ well-tested, creative solutions that can be found in popular design patterns. It is also critical for programmers to understand language features and conventions that can make C++ a safer language to use.
A programmer who learns how to use C++ as an object-oriented language, following safe programming conventions, will become a valuable C++ developer – a developer whose code is easy to maintain, modify, and be understood by others.
This book has step-by-step explanations of essential OO concepts, paired with practical examples in code and often with diagrams so you can truly understand how and why things work. Self-assessment questions are available to test your skills.
This book first provides necessary building blocks of skills (which may not be object-oriented) that provide the essential foundation on which to build OOP skills. Next, OO concepts will be described and paired with language features as well as coding techniques so that you can understand how to use C++ as an OOP language successfully. Additionally, more advanced skills are added to augment the programmer’s repertoire, including friend function/classes, operator overloading, templates (to build more generic code), exception handling (to build robust code), Standard Template Library (STL) basics, as well as design patterns and idioms. The book wraps up by re-examining programming constructs presented throughout the book, paired with conventions that lead to safer programming in C++. The end goal is to enable you to produce robust code that is easy to maintain and understand by others.
By the end of this book, you will understand both essential and advanced OO concepts and how to implement these concepts in C++. You will have a versatile toolkit of C++ programming skills. You will additionally understand ways to make safer, more robust, and easily maintainable code, as well as understand how to employ well-tested design patterns as part of your programming repertoire.