O'Reilly logo

Professional C++, Second Edition by Scott J. Kleper, Nicholas A. Solter, Marc Gregoire

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2

Designing Professional C++ Programs

WHAT’S IN THIS CHAPTER

  • The definition of programming design
  • The importance of programming design
  • The aspects of design that are unique to C++
  • The two fundamental themes for effective C++ design: abstraction and reuse
  • The different types of code available for reuse
  • The advantages and disadvantages of code reuse
  • General strategies and guidelines for reusing code
  • Open-source libraries
  • The C++ standard library
  • The specific components of C++ program design

Before writing a single line of code in your application, you should design your program. What data structures will you use? What classes will you write? This plan is especially important when you program in groups. Imagine sitting down to write a program with no idea what your coworker, who is working on the same program, is planning! In this chapter, we’ll teach you how to use the Professional C++ approach to C++ design.

Despite the importance of design, it is probably the most misunderstood and underused aspect of the software-engineering process. Too often programmers jump into applications without a clear plan: They design as they code. This approach inevitably leads to convoluted and overly complicated designs. It also makes the development, debugging, and maintenance tasks more difficult. Although counterintuitive, investing extra time at the beginning of a project to design it properly actually saves time over the life of the project.

WHAT IS PROGRAMMING DESIGN?

Your program ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required