Thursday, 6 June 2024

Abstraction

Real Meaning of abstract :- abstract is summary of you entire implementation & methods. abstract is short info of you lengthy code and features. user can understand by seeing abstract rather than see the entire implementation and lengthy lines. Abstract helps users to remember key point of entire implementation. Abstraction in OOP is about managing complexity by exposing only the necessary details to the client and hiding the implementation details. While it is not primarily about security, it does contribute to a more secure and robust system by encapsulating the internal workings and reducing the risk of unintended interactions. Abstraction is all about showing what is necessary Abstraction is more about design and not participate in implementation Intension of abstraction is Abstraction you can see what it can do , but you can't see how it is doing in C# we have Partial Abstraction and full abstraction features interface is best example for full abstraction. abstract class is partial abstraction as it have abstract and concrete members. abstraction define contracts that one or more class can implement, without dictating how should implement them. Key Intentions of Abstraction in OOP Highlighting Essential Features: Abstraction allows the developer to expose only the relevant attributes and methods of an object that are necessary for the client (user of the object). This makes it easier for the client to interact with the object without being overwhelmed by unnecessary details. Hiding Implementation Details: By hiding the complex implementation details and exposing only what is necessary, abstraction simplifies the interaction with the object. This helps in managing complexity and makes the system easier to understand and use. Reducing Complexity: Abstraction helps in breaking down complex systems into simpler, high-level components. This makes it easier to manage and maintain the system. Improving Modularity: By defining clear and simple interfaces, abstraction promotes modular design. Each module or component can be developed, tested, and understood independently. Enhancing Maintainability: With abstraction, changes in the implementation of an object do not affect the code that interacts with it, as long as the interface remains consistent. This improves maintainability and allows for easier updates and modifications. Encouraging Reusability: Encouraging Reusability: Abstract classes and interfaces define common behaviors that can be reused across different parts of the application or even in different projects. This reduces duplication and promotes code reuse. 9133662111

No comments:

Post a Comment

Abstraction

Real Meaning of abstract :- abstract is summary of you entire implementation & methods. abstract is short info of you lengthy code and ...