Skip to main content

Command Palette

Search for a command to run...

Programming Basics

Object Oriented Programming

Published
2 min read
Programming Basics
M

I am a Android developer at Pune, India.

Amongst other things, objects in programming can be used to model objects from the real world. Since programs are designed to work and be used in the real world, it helps to be able to mirror reality, using objects is a useful way of grouping together details.

Abstraction

Abstraction serves to hide the complex mechanisms within an object, leaving only the information that we need in order to interact with it.

Summary

  • Objects can be designed to model real-world things in software.
  • Objects group together details.
  • Abstraction means showing only what’s relevant and useful for the person using it.
  • By hiding all the inner workings of a given object with abstraction, we are able to reduce their apparent complexity.
  • A plan or blueprint for an object is called a class.
  • A class defines the attributes (a description), the methods (what it does), and the access level (who can use it) for an object.
  • To create an object, you have to instantiate it. An instantiated object is called an instance of a class.
  • Objects from the same class can differ in the details if they have different values for their attributes. They still have to follow the class plan, though!
  • Encapsulation is the bundling together of attributes, methods, and access control in order to protect an object.
  • When an object A can interact with a related object B, we say that object A contains object B and is therefore able to send it a message.
  • Objects can have attributes that are objects. These objects also have their own independent blueprint (class), attributes, behaviors, and access.
  • Objects communicate with one another by sending messages.
  • Associating objects with other objects allows you to more easily adapt and make changes to your system.

Test your knowledge on OOPS concepts by taking this quiz , Be honest guys :)

Basics of programming

Part 2 of 2

This series helps you understand programming and its basic building blocks with small Q&A and other related material.

Start from the beginning

Fundamentals of OS

Introduction to operating system (OS)