List of Listings
Chapter 1. Programming with objects: A primer
Listing 1.1. A minimum viable class
Listing 1.2. Calling a method on an instance
Listing 1.3. Defining a static method
Listing 1.4. Defining a constructor method
Listing 1.5. Throwing an exception inside the constructor
Listing 1.6. Defining a static factory method
Listing 1.7. Defining properties and assigning values
Listing 1.8. Defining constants
Listing 1.9. Adding a constructor argument
Listing 1.10. Defining and using a public property
Listing 1.11. Accessing another instance’s private property
Listing 1.12. Mutable vs. immutable objects
Listing 1.13. An object’s behaviors are defined as public methods
Get Object Design Style Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.