更新时间:2021-07-16 13:46:15
封面
版权信息
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Chapter 1. Objects Everywhere
Recognizing objects from nouns
Generating blueprints for objects
Recognizing attributes/fields
Recognizing actions from verbs – methods
Organizing the blueprints – classes
Object-oriented approaches in Python JavaScript and C#
Summary
Chapter 2. Classes and Instances
Understanding classes and instances
Understanding constructors and destructors
Declaring classes in Python
Customizing constructors in Python
Customizing destructors in Python
Creating instances of classes in Python
Declaring classes in C#
Customizing constructors in C#
Customizing destructors in C#
Creating instances of classes in C#
Understanding that functions are objects in JavaScript
Working with constructor functions in JavaScript
Creating instances in JavaScript
Chapter 3. Encapsulation of Data
Understanding the different members of a class
Protecting and hiding data
Working with properties
Understanding the difference between mutability and immutability
Encapsulating data in Python
Encapsulating data in C#
Encapsulating data in JavaScript
Chapter 4. Inheritance and Specialization
Using classes to abstract behavior
Understanding inheritance
Understanding method overloading and overriding
Understanding operator overloading
Taking advantage of polymorphism
Working with simple inheritance in Python
Working with simple inheritance in C#
Working with the prototype-based inheritance in JavaScript
Chapter 5. Interfaces Multiple Inheritance and Composition
Understanding the requirement to work with multiple base classes
Working with multiple inheritance in Python
Interfaces and multiple inheritance in C#
Working with composition in JavaScript
Chapter 6. Duck Typing and Generics
Understanding parametric polymorphism and duck typing
Working with duck typing in Python
Working with generics in C#
Working with duck typing in JavaScript
Chapter 7. Organization of Object-Oriented Code
Thinking about the best ways to organize code
Organizing object-oriented code in Python
Organizing object-oriented code in C#
Organizing object-oriented code in JavaScript
Chapter 8. Taking Full Advantage of Object-Oriented Programming
Putting together all the pieces of the object-oriented puzzle
Refactoring existing code in Python
Refactoring existing code in C#
Refactoring existing code in JavaScript
Index