开发者

abstraction and encapsulation in asp.net?

开发者 https://www.devze.com 2022-12-22 16:24 出处:网络
when we write all our applicationmethods and variables in a classes is nothing but data abstract开发者_运维知识库ion and encapsulation. Is it right?Could be true but depends over your design. An Appli

when we write all our application methods and variables in a classes is nothing but data abstract开发者_运维知识库ion and encapsulation. Is it right?


Could be true but depends over your design. An Application is nothing but combination of classes working as units to accomplish task. So every thing is something from a class like method, property etc, in Object Oriented Methodology

Abstraction:

By this feature of object oriented programming it is possible to represent the needed information in program without presenting the details.

Data Encapsulation:

Data Encapsulation is the process of combining data and functions into a single unit called class. By this method one cannot access the data directly. Data is accessible only through the functions present inside the class. Thus Data Encapsulation gave rise to the important concept of data hiding.

reference: what is data abstraction and data encapsulation


It's Encapsulation, but not necessarily Abstraction.

In OO, abstraction typically refers to type abstraction. So, it can be argued that using a class type at all is abstraction, but many would say no you'd have to be using polymorphism or inheritance in some way.

0

精彩评论

暂无评论...
验证码 换一张
取 消