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
- Improved productivity during software development
- Improved software maintainability
- Faster development sprints
- Lower cost of development
- Higher quality software
Challenges associated with OOP:
- Steep learning curve
- Larger program size
- Slower program execution
- Its not a one-size fits all solution.
No comments:
Post a Comment