8.3 Summary

Objects and their corresponding methods are the building blocks of many of today’s software systems. For all object-oriented programming languages, some objects and methods are predefined, and those are always specified in the language manuals.

In that light, we introduced objects, explained built-in objects, and discussed parameter passing, a mechanism to transfer information in and out of objects.

8.3.1 Key Concepts

  • Classes define the characteristics and behaviors of objects belonging to the class.

  • Objects are instantiations of a class. They have a name and possess all the properties of the class, namely, the variables and the methods.

  • The application user interface, or API, is an interface used to communicate with some underlying functionality.

8.3.2 Key Definitions

  • Object: An isolated piece of code that has its own actions and data.

  • Method: The action that an object may perform.

  • API: An interface provided to the programmer to allow the use of certain functionality without knowing the specifics of the implementation.

  • Class: Construct that contains the definition of an object template and the implementation of the methods.

  • Parameter passing: The passing of data to a method within an object.

Get Computer Science Programming Basics in Ruby 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.