Book Image

Demystified Object-Oriented Programming with C++

By : Dorothy R. Kirk
Book Image

Demystified Object-Oriented Programming with C++

By: Dorothy R. Kirk

Overview of this book

<p>While object-oriented software design helps you write more easily maintainable code, companies choose C++ as an OO language for its speed. Object-oriented programming (OOP) in C++ is not automatic – understanding OO concepts and how they map to C++ language features as well as OOP techniques is crucial. You must also know how to distinguish your code by utilizing well-tested, creative solutions, which can be found in popular design patterns. This book will help you to harness OOP in C++ for writing better code. </p><p>Starting with the essential C++ features that serve as building blocks for the main chapters, this book explains fundamental object-oriented concepts and shows you how to implement them in C++. With the help of practical code examples and diagrams, you’ll find out how and why things work. The book’s coverage furthers your C++ repertoire by including templates, exceptions, operator overloading, STL, and OO component testing. You’ll also discover popular design patterns with in-depth examples and how to use them as effective programming solutions to recurring OOP problems. </p><p>By the end of this book, you’ll be able to employ essential and advanced OOP concepts confidently to create enduring and robust software.</p>
Table of Contents (27 chapters)
Section 1: C++ Building Block Essentials
Section 2: Implementing Object-Oriented Concepts in C++
Section 3: Expanding Your C++ Programming Repertoire
Section 4: Design Patterns and Idioms in C++

Section 1: C++ Building Block Essentials

The goal of this section is to ensure that you have a strong background in non-OO C++ skills in which to build the forthcoming OOP skills in C++. This is the shortest section of the book, designed to quickly get you up to speed in preparation for the OOP and more advanced book chapters.

The first chapter quickly reviews assumptions of prior skills that are made in the book: basic language syntax, looping constructs, operators, function usage, user defined type basics (struct, typedef and class basics, enum), and namespace basics. The next chapter discusses const qualified variables, function prototyping, prototyping with default values, and function overloading.

The subsequent chapter covers indirect addressing with pointers by introducing new() and delete() to allocate basic types of data, dynamically allocating arrays of 1, 2, and N dimensions, managing memory with delete, passing parameters as arguments to functions, and using void...