Object-Oriented Design Choices
Object-Oriented Design Choices
Click to enlarge
Author(s): Dingle, Adair
ISBN No.: 9780367820183
Pages: 348
Year: 202101
Format: Trade Paper
Price: $ 105.16
Dispatch delay: Dispatched between 7 to 15 days
Status: Available

Preface Detailed Book Outline Section I: Stable Type Desig Contractual Design and the Class Construct Encapsulation Explicit Design and Constraints Class (Type) Functionality Constructors Accessors and Mutators Utility and Public Methods Destructors Design as a Contract Error Handling Published Assumptions Invariants Programming by Contract Example Contractual Expectations OO Design Principle Summary Design Exercises Ownership - Abstracted but Tracked The Abstraction of Memory Heap Memory Ownership of Heap Objects Array Allocation Design Intervention Persistent Data Class Design Memory Reclamation C++ Explicit Deallocation Garbage Collection Reference Counting Design: Storage vs Computation OO Design Principle Summary Design Exercise Data Integrity Data Corruption Copying Shallow versus Deep Copying C++ Copying of Internal Heap Memory Unseen Aliasing C# Cloning to Avoid Aliasing Move semantics Handle: C++ Smart Pointers unique_ptr shared_ptr weak_ptr usage OO Design Principle Summary Design Exercises Section II: Strategic Type Coupling Composition Object-oriented Relationships Containment (Holds-A) Composition (Has-A) Modification Replacement Postponed instantiation Echoing an Interface Interfaces for Design Consistency Wrappers and Delegates Dependency Injection Constructor Injection Property (Setter) Injection Method Injection Dependency Injection Costs and Benefits OO Design Principle Summary Design Exercises Inheritance Automate Type Checking Polymorphism Overloading Generics Subtype polymorphism Function inlining Costs and Benefits of Polymorphism Dynamic Binding whoami() type identification Keywords for dynamic binding Heterogeneous Collections Virtual Function table Abstract Classes Inheritance designs OO Design Principle Summary Design Exercises Inheritance vs Composition Constrained Inheritance When Only Composition is Viable When Inheritance Leaks Memory: C++ destructors Inconsistent Access: C++ accessibility and binding Code Reuse Class Design: Has-a or Is-a? Inheritance with and without Composition 5Software Maintainability OO Design Principle Summary Design Exercises Section III: Effective Type Reuse Design Longevity Software Evolution Disassembler Example Virtual Function Table Type Extraction Problematic Type Extension Multiple Inheritance and its Simulation Design difficulties Single inheritance with composition Simulation without inheritance Class Hierarchies Cross-Products OO Design Principle Summary Design Exercises Operator Overloading Operators represent functions Overloading Addition in C++ Client Expectations Operator Overloading in C# Operators Overloaded only in C++ Indexing support I/O via the stream operators Type conversion Transparent access OO Design Principle Summary Design Exercise Appendix A: The Pointer Construct Pointer definition Dereferencing pointers Inappropriate use of pointers Transient versus persistent memory References The this pointer Arrays Summary Appendix B: Design Examples Contractual Design Ownership: C++ class memory management Copying Composition Inheritance Appendix C: Comparative Design Examples Composition versus Inheritance Design longevity Operator overloading Glossary References.


To be able to view the table of contents for this publication then please subscribe by clicking the button below...
To be able to view the full description for this publication then please subscribe by clicking the button below...