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

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

 
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.
我的理解:
一个对象,对于实际开发来将,包括有用的信息和没有用的信息,抽象就是提取出重要的信息,忽略不重要的信息。
这个概念没有什么好说的。
 
举例说明!

转载地址:http://bslfm.baihongyu.com/

你可能感兴趣的文章
如何获取数据表中自增主键的值
查看>>
【C# in depth 第三版】温故而知新(1)
查看>>
hdu2955 Robberies
查看>>
Ubantu MySQL数据库操作
查看>>
2018-2019-2 网络对抗技术 20165324 Exp5:MSF基础应用
查看>>
final用法
查看>>
Flask架站基础篇(七)--SQLAlchemy(1)
查看>>
Java程序设计第一次作业
查看>>
浏览器盒子模型
查看>>
由上一个血案引发的关于property和attribute关系的思考
查看>>
BZOJ 2734: [HNOI2012]集合选数
查看>>
Xilinx FPGA结构
查看>>
day06<面向对象>
查看>>
Panel(面板)数据结构
查看>>
Python 学习笔记 -- 类的访问限制
查看>>
图片轮播——点击切换
查看>>
20145223《信息安全系统设计基础》第9周学习总结
查看>>
【转】Python特殊语法:filter、map、reduce、lambda
查看>>
Java实现Http服务器(二)
查看>>
JavaScript 开发者必备:七大资源共享
查看>>