Member-only story
Object-Oriented Programming
Object-oriented programming languages are defined by the following key words: abstraction, encapsulation, inheritance, and polymorphism. An object is a container of data and functions that affect the data. In an OOP, a "child" object can "extend" another object (making it more specific) by inheriting from a "parent" object. Thus the child gets all the parents data and functionality "for free." The idea of an "interface" is also key to OOPs. An interface is the allowed interaction between the outside world (e.g., other programs) and the object itself.
The following notes are "in progress." Please refer back to this page at a later date.
Objects
Objects are at heart very simple. They are a way to represent information about a "real world" idea, and they contain ways to manipulate that information. All of this "code" is encapsulated in an object recipe (class file).
They contain information about something in the program.
They provide actions (also called functions or methods) that manipulate that information. By combining all the data and actions that can apply to an "object" into one piece of code, we make our programs easier to write and maintain.
Often an "object" in
Often an "object" in a computer program tries to model (i.e., approximate) a real-world entity…