1-1面向对象初探
变量也是Object
Data: the properties  or status; is the core
Operations: the functions对外能提供的服务,给灯通电或者不通电。
                           map
Problem space --------------Solution space
 
object  oriented(00)
是一种组织  设计 和实现的思想(Designs&Implementations)
 
2-2 面向对象基本概念
对象之间通过message进行信息交换
Object send messages
  Messages are
    Composed by the sender
    Interpreted by the receiver
    Implemented by the methods
  Messages
    May cause receiver to change state
    May return the result
 
Object vs.Class
  Object(cat)
        Represent things,events ,or concepts
        Respond to message at run-time
  Class(cat class)
    Define properties of instances
        Act like types in C++
 
OOP Characteristics
  1.Evertything is an objetct.
  2.A program is a bunch of objects telling each other what to do by sending messages.
  3.Each Object has its own memory make up of other objects.
  4.Every object has a type.
  5.All objects of a particular type can receive the same messages.
 
An object has an interface
  The interface is the way it receives messages.
  It is defined in the class the object belong to.
 
Functions of the interface
  如果有借口,那么可以很方便的换其他东西,做出在程序中可以拆换的东西
  耦合-内聚,耦合性大是我们希望做到的。
  Communication:与外界进行沟通。
  Protection;如果有借口,就可以保护内部的Implementations,外边的借口了还是不变的。
 
The Hidden Implementation(隐藏实现)
  Inner part of an object, data members to present its state, and the actions it takes
  when messages is rcvd is hidden.
Class creators Vs. Client programmers
  -Keep client programmer's hand off portions they should not touch.
  -Allow the class creators to change the interval working of the class without   worrying how it will affect the client programmers.
 
Encapsulation(封装)
  bundle data and methods dealing with these data together in an object
  Hide the details of the data and action.
  Restrict only access to the publicized methods.

最新文章

  1. 深入理解脚本化CSS系列第六篇——脚本化伪元素的6种方法
  2. ReactiveCocoa源码拆分解析(四)
  3. [转]TextView maxWidth maxLength maxEms 区别
  4. C++11特性:auto关键字
  5. Markdown--PDF--PPT--Flash 工具链
  6. 想调试,装了个Zend Server
  7. GS连接事件
  8. TopCoder SRM 605 DIV1
  9. cocos2d-x图片变灰或者变亮
  10. IT专业人士如何更有效的学习专业知识
  11. Cat 跨线程之 TaggedTransaction 用法和原理分析
  12. Docker安装+HelloWorld+运行Tomcat
  13. 最新版Navicat Premium12 中文破解版 安装激活
  14. NOIP-质因数分解
  15. #Leetcode# 1016. Binary String With Substrings Representing 1 To N
  16. beta版本“足够好”/测试矩阵
  17. POJ 2318 - TOYS - [计算几何基础题]
  18. bootstrap学习笔记(4)
  19. Python自定义大小截屏
  20. Struts2的学习-属性驱动和模型驱动

热门文章

  1. 解决apache httpd列出目录列表中文乱码问题
  2. css的再深入7(更新中···)
  3. .Net 读取配置文件 xml
  4. 浅谈Overload和Override
  5. 【SQL Server备份恢复】维护计划实现备份:每周数据库完整备份、每天差异备份、每小时日志备份
  6. Swapping Characters CodeForces - 903E (字符串模拟)
  7. 『Numpy』内存分析_高级切片和内存数据解析
  8. loj#2059. 「TJOI / HEOI2016」字符串 sam+线段树合并+倍增
  9. 1023. Camelcase Matching驼峰式匹配
  10. Qt使用std::sort进行排序