In this chapter, we looked at how object-orientation adopted the concept of encapsulation to combine related state and behavior within a single unit of code, known as a class. We further explored how objects are instances of a class created through invoking a constructor method.
We also discussed several different ways of looking at and reasoning about objects - as a state machine, and as structured data stored in memory. We discussed how a method is really a form of message passing that provides an interface to interact with objects safely.
Finally, we explored how all of these concepts are implemented in both the Java and Python programming languages.
Check your understanding of the new content introduced in this chapter below - this quiz is not graded and you can retake it as many times as you want.Quizdown quiz omitted from print view.