[course05] 01 Object Concapt
[course05] 01 Object Concapt
Object-Oriented Programming
Object-oriented Programming in 7 minutes
Basic OOP

Object-Oriented Programming (OOP) is a programming language paradigm based on the concept of “objects“, which may contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods.
A feature of objects is that an object’s procedures can access and often modify the data fields of the object with which they are associated (objects have a notion of “this” or “self“). In OOP, computer programs are designed by making them out of objects that interact with one another.
There is a significant diversity of OOP languages, but the most popular ones are class-based, meaning that objects are instances of classes, which typically also determine their type.

Basic OOP concepts
Abstraction: The process of picking out (abstracting) common features of objects and procedures.
Class: A category of objects. The class defines all the common properties of the different objects that belong to it.
Encapsulation: The process of combining elements to create a new entity. A procedure is a type of encapsulation because it combines a series of computer instructions.
Information hiding: The process of hiding details of an object or function. Information hiding is a powerful programming technique because it reduces complexity.
Inheritance: a feature that represents the “is a” relationship between different classes. Interface: the languages and codes that the applications use to communicate with each other and with the hardware.
Messaging: Message passing is a form of communication used in parallel programming and object-oriented programming.
Object: a self-contained entity that consists of both data and procedures to manipulate the data.
Polymorphism: A programming language’s ability to process objects differently depending on their data type or class.
Procedure: a section of a program that performs a specific task.

Object and Classes
Classes – the definitions for the data format and available procedures for a given type or class of object; may also contain data and procedures (known as class methods) themselves, i.e. classes contain the data members and member functions
Objects sometimes correspond to things found in the real world. For example, a graphics program may have objects such as “circle”, “square”, “menu”. An online shopping system might have objects such as “shopping cart”, “customer”, and “product”. Sometimes objects represent more abstract entities, like an object that represents an open file, or an object that provides the service of translating measurements from U.S. customary to metric.
Class variables – belong to the class as a whole; there is only one copy of each one.
Instance variables or attributes – data that belongs to individual objects; every object has its own copy of each one
Member variables – refers to both the class and instance variables that are defined by a particular class
Class methods – belong to the class as a whole and have access only to class variables and inputs from the procedure call
Instance methods – belong to individual objects, and have access to instance variables for the specific object they are called on, inputs, and class variables
Last updated
Was this helpful?