博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【Abstraction】【抽象】【系统学习】
阅读量:5049 次
发布时间:2019-06-12

本文共 1801 字,大约阅读时间需要 6 分钟。

 
Retail Application-Activity
 
Consider the Retail store application:
When a customer goes to purchase  a television for example, what are the details given by the salesperson about the television?
 
Characteristics of the television (model, make, color etc)
Basic functioning of the television
 
What are the details which are not mentioned by the salesperson ?
 
The internal components (resistors, switches etc)
How the internal components are wired and how they work
 
Let us identify the OO concept discussed here
 
ABSTRACTION : Process of  identifying the essential details to be known and ignoring the non-essential details from the perspective of the end user
 
ØDefined as the process of focusing the essential details and ignoring the non-essential details
§Helps simplify the understanding and using of any complex system
–Ex. The driver of a car needs to know how to apply brake, change gear and balance the steering. The driver need not know how the engine works
 
The process of focusing on the  relevant details and ignoring the irrelevant details is called Abstraction. Abstraction is not an entirely new concept introduced by OOP. Structured Programming also supported abstraction with the help of data structures and functions. For example, one need not know the internal details of the printf function of C to use it. One need not know about how characters are converted to ASCII code and stored in the memory for using a character array.
OOP provides better abstraction. While structured programming provides abstraction at the level of data structures and function, OOP provides abstraction at a higher level. Higher the abstraction level easier it is to understand.
我的理解:
一个对象,对于实际开发来将,包括有用的信息和没有用的信息,抽象就是提取出重要的信息,忽略不重要的信息。
这个概念没有什么好说的。
 
举例说明!

转载于:https://www.cnblogs.com/yqskj/articles/2063595.html

你可能感兴趣的文章
关于现在,关于未来
查看>>
day9 重写父类的方法
查看>>
你应该知道的四种优秀架构
查看>>
php 支持8种基本的数据类型
查看>>
保卫"木叶",从火影剧情看网站攻防的演变
查看>>
大数据学习——linux常用命令(三)
查看>>
linux下memcache的运用,和php结合小案例。
查看>>
COGS 1298. 通讯问题
查看>>
ip地址
查看>>
理解使用 JavaScript 构建 Metro 应用
查看>>
c++ std::string.c_str()
查看>>
i++和++i
查看>>
MFC六大核心机制
查看>>
iPhone 屏幕分辨率
查看>>
thinkPHP 模板中变量的使用
查看>>
java 的访问权限控制
查看>>
BZOJ 3676: [Apio2014]回文串
查看>>
在C#4.0中使用NPLOT
查看>>
用FPGA驱动ov7670摄像头用tft9328显示
查看>>
图像增强
查看>>