Total Page Preview:   000000000526

What is abstraction in OOPS in English and Hindi

 
 
 
 
 
Abstraction in OOPS in English:
 
Abstraction is a concept in object-oriented programming (OOPS) that focuses on hiding implementation details and only exposing necessary information to the user. Abstraction allows developers to create complex systems by breaking them down into smaller, more manageable parts. C# provides various constructs to implement abstraction, such as interfaces, abstract classes, and access modifiers.
 
Here's an example of abstraction in C# using an abstract class:
 
 
 
In this example, the Shape class is an abstract class that defines an abstract method called Area(). The Circle class is a derived class that inherits from Shape and implements the Area() method to calculate the area of a circle.
 
When an instance of the Circle class is created and stored in a Shape variable, only the Area() method can be called on it. The implementation details of the Circle class are hidden from the user, and they only need to know how to use the Area() method.
 
This example demonstrates how abstraction can be used to create a more maintainable and scalable system by separating concerns and hiding implementation details.
 
 
 
 
 
Abstraction in OOPS in Hindi:
 
Abstraction ek concept hai object-oriented programming (OOPS) mai jisme implementation details ko chhupana aur sirf jaruri information ko user ko provide karna focus kiya jata hai. Abstraction se developers bade systems ko chhote manageable parts mai divide karke develop kar sakte hai. C# mai abstraction implement karne ke liye various constructs jaise interfaces, abstract classes, aur access modifiers provide karta hai.
 
Yahan ek C# ka abstraction example diya gaya hai:
 
 
 
Is example mai, Shape class ek abstract class hai jisme ek abstract method Area() define kiya gaya hai. Circle class ek derived class hai jo Shape class se inherit karti hai aur Area() method ko implement karke circle ke area ko calculate karti hai.
 
Jab Circle class ka ek instance banaya jata hai aur usse Shape variable mai store kiya jata hai, tab uspar sirf Area() method hi call kiya ja sakta hai. Circle class ki implementation details user se chhupi hai aur vo sirf Area() method ko use karna janta hai.
 
Is example se demonstrate hota hai ki abstraction kaise use kiya ja sakta hai aur kaise ek more maintainable aur scalable system create kiya ja sakta hai by separating concerns aur implementation details ko chhupakar.
 
 
 
 
 
 
 

 

Thank You

About Author

Brijesh Kumar

Database Developer

I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall and Database Migration On-Premise to Azure Cloud.
LinkedIn : https://www.linkedin.com



Comments


                           
                           

                           

                           

Facebook User: