Book description
Learn the fundamentals of Object-Oriented design by investigating good—and bad—code!Well-designed applications run more efficiently, have fewer bugs, and are easier to revise and maintain. Using an engaging “before-and-after” approach, Object-Oriented Software Design in C++ shows you exactly what bad software looks like and how to fix it with good design principles and patterns.
In Object-Oriented Software Design in C++, you’ll find:
- Design-code-test iterations that improve code with each revision
- Gathering requirements to make sure you’re developing the right application
- Design principles like encapsulation and delegation that solve programming problems
- Design patterns including Observer Design Pattern that fix architecture issues
- Using recursion and multithreading to simplify common solutions
Object-Oriented Software Design in C++ is a vital guide to building the kind of high performance applications delivered by the pros—all using industry-proven design principles and patterns. You’ll learn how to gather and analyze requirements so you’re building exactly what your client is looking for, backtrack mistakes with iterative development, and build a toolbox of design patterns that troubleshoot common issues with application architecture. The book’s accessible examples are written in C++ 17, but its universal principles can be applied to any object-oriented language.
About the Technology
Good design is the foundation of great software. Mastering the principles of object-oriented design is the surest way to create applications that run fast, have few bugs, and last well into the future. Written especially for new C++ programmers, this easy-to-read book gently mentors you in the art of designing great software.
About the Book
Object-Oriented Software Design in C++ introduces object-oriented design principles, practices, and patterns in clear, jargon-free language. The instantly-familiar before-and-after examples highlight the benefits of good design. Each chapter is full of friendly conversations that anticipate your questions and help point out the subtleties you might overlook. Along the way, you’ll pick up tips about idiomatic C++ style that will set your code apart.
What's Inside
- Design-code-test iterations
- Design principles for common programming problems
- Architecture design patterns in plain English
- Recursion and multithreading
About the Reader
Examples are in C++ 17.
About the Author
Ronald Mak is a former NASA senior scientist. Currently, he teaches computer science at San Jose State University.
The technical editor on this book was Juan Rufes.
Quotes
It is a joy to see these timeless and pragmatic lessons! If you have basic C++ knowledge, you will become a better programmer by mastering these principles and patterns of object-oriented design.
- Cay Horstmann, author of Core Java and Big C++
Ron Mak has mentored many, many students and through this book you can benefit from his knowledge and experience.
- Dan Harkey, Director of Software Engineering, San Jose State University
Elevate your software design skills with this exceptional guide. A brilliantly crafted masterpiece that goes deep into the art of designing software.
- Eros Pedrini, NTT Data
Table of contents
- Object-Oriented Software Design in C++
- Copyright
- contents
- front matter
- Part 1. Introduction
-
1 The path to well-designed software
- 1.1 What is software design?
- 1.2 What you will learn from this book
- 1.3 The benefits of good software design
- 1.4 A few design examples
- 1.5 Make sure we’re going to build the right application; then, build it right
- 1.6 Good design doesn’t come easily
- 1.7 Change and complexity are the enemies of good design
- 1.8 Design with object-oriented programming concepts
- Summary
- 2 Iterate to achieve good design
- Part 2. Design the right application
-
3 Get requirements to build the right application
- 3.1 The overture to application design
- 3.2 Functional requirements: What must the application do?
- 3.3 Nonfunctional requirements: Constraints on the application
- 3.4 What are good requirements?
- 3.5 How to get requirements
- 3.6 Unified Modeling Language diagrams for creating and documenting design
- 3.7 Use cases provide context for the requirements
- 3.8 The functional specification and software validation
- 3.9 Where do classes come from?
- Summary
-
4 Good class design to build the application right
- 4.1 When do we do application design?
- 4.2 Two important goals for good class design
- 4.3 UML class diagrams to document class design
- 4.4 Class relationships determine runtime interactions
- 4.5 UML state diagram: How an object changes state
- 4.6 UML sequence diagram: How objects interact [optional]
- 4.7 The design specification and software verification
- Summary
- Part 3. Design the application right
-
5 Hide class implementations
- 5.1 The Principle of Least Knowledge and hidden implementations
- 5.2 Public getter and setter functions access hidden implementation selectively
- 5.3 Class Date: An example of implementation hiding
- 5.4 Public setter functions carefully modify hidden implementation
- 5.5 Beware of dangerous setter functions
- 5.6 Rules from the Law of Demeter
- 5.7 But is the implementation really hidden?
- 5.8 The Open-Closed Principle supports code stability
- Summary
- 6 Don’t surprise your users
- 7 Design subclasses right
- Part 4. Design patterns solve application architecture problems
- 8 The Template Method and Strategy Design Patterns
- 9 The Factory Method and Abstract Factory Design Patterns
- 10 The Adapter and Façade Design Patterns
- 11 The Iterator and Visitor Design Patterns
- 12 The Observer Design Pattern
- 13 The State Design Pattern
- 14 The Singleton, Composite, and Decorator Design Patterns
- Part 5. Additional Design Techniques
-
15 Designing solutions with recursion and backtracking
- 15.1 Recursion compared to the for loop
- 15.2 Finding the largest value by recursion
- 15.3 Reversing a vector by recursion
- 15.4 Solve the Towers of Hanoi puzzle by recursion
- 15.5 Recursive algorithms for a binary search tree
- 15.6 Quicksort an array with recursion
- 15.7 The Fibonacci sequence and a recursion disaster
- 15.8 Dynamic backtracking increases the power of recursion
- 15.9 Solving the eight queens puzzle with recursion and backtracking
- 15.10 Solving Sudoku puzzles with recursion and backtracking
- Summary
- 16 Designing multithreaded programs
- index
Product information
- Title: Object-Oriented Software Design in C++
- Author(s):
- Release date: June 2024
- Publisher(s): Manning Publications
- ISBN: 9781633439504
You might also like
book
Hands-On Design Patterns with C++
A comprehensive guide with extensive coverage on concepts such as OOP, functional programming, generic programming, and …
book
Practical C++ Design: From Programming to Architecture
Go from competent C++ developer to skilled designer or architect using this book as your personal …
book
Template Metaprogramming with C++
Understand how to use modern C++ templates for writing maintainable, robust, and fast software Key Features …
book
Hands-On Design Patterns with C++ - Second Edition
A comprehensive guide with extensive coverage of concepts such as OOP, functional programming, generic programming, concurrency, …