Object-Oriented Software Design In C++ Год издания: 2024 Автор: Ronald Mak Жанр или тематика: Программирование Издательство: Manning ISBN: 9781633439504 Язык: Английский Формат: EPUB Качество: Издательский макет или текст (eBook) Интерактивное оглавление: Да Количество страниц: 499 Описание: 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. Purchase of the print book includes a free eBook in PDF and ePub formats from Manning Publications. 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.
Оглавление
contents Front matter preface acknowledgments about this book about the author about the cover illustration 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 Leaking changes Code that’s too complex Inflexible code Surprise! Common architecture problems 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 2 Iterate to achieve good design 2.1 Good application design requires an iterative process 2.2 Don’t let changes leak out 2.3 Iterate to achieve good design Iteration 1: Initial cohesive classes Iteration 2: Encapsulation, delegation, and loose coupling Iteration 3: More kinds of books and their attributes Iteration 4: A better design after backtracking 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 A short requirements case study Stated and implied requirements 3.6 Unified Modeling Language diagrams for creating and documenting design 3.7 Use cases provide context for the requirements UML use case diagram Use case description 3.8 The functional specification and software validation 3.9 Where do classes come from? Textual analysis: Nouns can become classes Textual analysis: Verbs can become member functions 4Good class design to build the application right 4.1 When do we do application design? 4.2 Two important goals for good class design Cohesion and the Single Responsibility Principle Loose coupling and the Principle of Least Knowledge 4.3 UML class diagrams to document class design 4.4 Class relationships determine runtime interactions Dependency: The most basic relationship Aggregation and composition: Objects that contain other objects Generalization: Superclasses and their subclasses Abstract classes and interfaces: What subclasses must implement 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 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 Iteration 1: Date arithmetic with loops Iteration 2: Julian day numbers simplify date arithmetic Iteration 3: A hybrid approach with lazy evaluation 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 6 Don’t surprise your users 6.1 No surprises and the Principle of Least Astonishment Off-by-one errors Misnamed functions can mislead their callers 6.2 Poor performance is an unwelcome surprise Bad design can cause unexpected performance problems The vexatious performance of C++ vectors 6.3 Programming by Contract helps to eliminate surprises [optional] Programming a circular buffer by contract Precondition: What must be true before calling a function Postcondition: What must be true after returning from a function Class invariant: What must remain true of object states 7 Design subclasses right 7.1 When to use function overriding or overloading Override superclass member functions to get subclass behavior Overload functions that have similar or equivalent behaviors 7.2 The Liskov Substitution Principle and proper subclasses 7.3 Choosing the is-a and has-a relationships 7.4 Use a factory function with the Code to the Interface Principle 7.5 Programming by Contract with subclasses [optional] Part 4. Design patterns solve application architecture problems The benefits of design patterns Explaining the design patterns The sports examples 8 The Template Method and Strategy Design Patterns 8.1 The Template Method Design Pattern defines the steps of an algorithm Desired design features Before using the Template Method Design Pattern After using the Template Method Design Pattern Template Method’s generic model 8.2 The Strategy Design Pattern encapsulates algorithms Desired design features Before using the Strategy Design Pattern After using the Strategy Design Pattern Strategy’s generic model 8.3 Choose between Template Method and Strategy 9 The Factory Method and Abstract Factory Design Patterns 9.1 The Factory Method Design Pattern lets subclasses create objects Desired design features Before using the Factory MethodDesign Pattern After using the Factory Method Design Pattern Factory Method’s generic model 9.2 The Abstract Factory Design Pattern creates families of objects Before using the Abstract Factory Design Pattern After using the Abstract Factory Design Pattern Abstract Factory’s generic model 10 The Adapter and Façade Design Patterns 10.1 The Adapter Design Pattern integrates code Desired design features Before using the Adapter Design Pattern After using the Adapter Design Pattern Adapter’s generic model An alternative Adapter Design Pattern model 10.2 The Façade Design Pattern hides a subsystem of interfaces Desired design features Before using the Façade Design Pattern After using the Façade Design Pattern Façade’s generic model 11 The Iterator and Visitor Design Patterns 11.1 The Iterator Design Pattern encapsulates iterating over different sequential collections Desired design features Before using the Iterator Design Pattern After using the Iterator Design Pattern Iterator’s generic model 11.2 The Visitor Design Pattern encapsulates different algorithms that operate on a data collection Desired design features Before using the Visitor Design Pattern 11.3 After using the Visitor Design Pattern Visitor’s generic model 12 The Observer Design Pattern 12.1 The Observer Design Pattern represents the publisher–subscriber model Desired design features Before using the Observer Design Pattern After using the Observer Design Pattern The Observer’s generic model 13 The State Design Pattern 13.1 The State Design Pattern models state transitions Desired design features Before using the State Design Pattern After using the State Design Pattern State’s generic model 14 The Singleton, Composite, and Decorator Design Patterns 14.1 The Singleton Design Pattern ensures a class has only one object Desired design features Before using the Singleton Design Pattern After using the Singleton Design Pattern Singleton’s generic model 14.2 The Composite Design Pattern treats individual and composite objects uniformly Desired design features Before using the Composite Design Pattern After using the Composite Design Pattern Composite’s generic model 14.3 The Decorator Design Pattern dynamically adds object responsibilities Desired design features Before using the Decorator Design Pattern After using the Decorator Design Pattern Decorator’s generic model 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 Inserting into a BST with recursion Printing a BST with recursion Removing all the nodes of a BST with recursion 15.6 Quicksort an array with recursion Quicksort in action Partitioning an array into subarrays Quicksort implementation 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 16 Designing multithreaded programs 16.1 How do things happen simultaneously? 16.2 A mutex enforces mutual exclusion Protect the integrity of a shared resource The classic reader–writer problem 16.3 Condition variables synchronize threads How condition variables synchronize threads The classic producer–consumer problem 16.4 A final note on multithreading index
Mak Ronald - Object-Oriented Software Design In C++ [2024, EPUB, ENG] [uztracker.net-24964].torrent
Вы не можете начинать темы Вы не можете отвечать на сообщения Вы не можете редактировать свои сообщения Вы не можете удалять свои сообщения Вы не можете голосовать в опросах Вы не можете прикреплять файлы к сообщениям Вы можете скачивать файлы
!ВНИМАНИЕ!
Сайт не предоставляет электронные версии произведений, а занимается лишь коллекционированием и каталогизацией ссылок, присылаемых и публикуемых на форуме нашими читателями. Если вы являетесь правообладателем какого-либо представленного материала и не желаете, чтобы ссылка на него находилась в нашем каталоге, свяжитесь с нами, и мы незамедлительно удалим ее. Файлы для обмена на трекере предоставлены пользователями сайта, и администрация не несет ответственности за их содержание. Просьба не заливать файлы, защищенные авторскими правами, а также файлы нелегального содержания!