3.10. Summary
In this chapter, you've learned the following:
An object is a software abstraction of a physical or conceptual real-world object.
A class serves as a template for defining objects; specifically, a class defines the following:
What data the object will house, known as an object's fields
What behaviors an object will be able to perform, known as an object's operations (methods)
An object can then be thought of as a filled-in template.
Just as we can declare variables to be of simple predefined types such as int, double, and bool, we can also declare variables to be of user-defined types such as Student and Professor.
When we create a new object (a process known as instantiation), we typically store a reference to that object in a reference ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access