Sunday, 16 August 2020

Object-Oriented Programming

  

 What are object-oriented programming?

Object-oriented programming (OOP) refers to a type of computer programming method (software design) in which programmers define the data type of a data structure, and also the types of operations (functions) that can be applied to the data structure. Once an object is created, it can be used in the code as many times we need it.

For example, if we create a design for a house, we can use the same design to build many houses for different customers in different interior and paint. Like that here, a set of functions implemented in a created Class is used in different places to create instances/objects for different functions.OOP languages are diverse, but most popular are class-based. That means objects are instances of main classes.

The languages they are using this concept in the current period are:
  • C#
  • Java
  • C++
  • Python
  • Dart
  • Scala
  • Swift
  • Ruby, etc.
Among these C# and Java are popular for web application development these days, C++ is good for game development, Dart is emerging in mobile app development along with flutter framework, and python is used mostly in data science and in games too. Object-Oriented languages are easy to learn and implement as there we can use the same code in different places(repeated usage).

Object-Oriented concepts 

Object: The entity that has state and behavior. For example, if Student is a class. Raj is an object of it.

Class: Class is a set of objects which have common properties. It can be a blueprint for those objects and can't be physical.

The Object-Oriented design has four major concepts for the function of the system. They are:
  • Inheritance
  • Abstraction
  • Encapsulation
  • Polymorphism

Benefits of Object-Oriented Programming

  1. Improved productivity during software development 
  2. Improved software maintainability
  3. Faster development sprints
  4. Lower cost of development
  5. Higher quality software

Challenges associated with OOP:

  1. Steep learning curve
  2. Larger program size
  3. Slower program execution
  4. Its not a one-size fits all solution.

No comments:

Post a Comment

Why to learn java?

Java is a high-level programming language originally developed by Sun Microsystems and released in 1995. Java runs on a variety of platforms...