python 面向对象编程读书笔记

一、they are models of something that can do certain things and have certain things done to
them. Formally, an object is a collection of data and associated behaviors.  (对象是一组数据及相关方法行为的集合。)
编程

二、Object-oriented analysis (OOA) is the process of looking at a problem, system, or
task (that somebody wants to turn into an application) and identifying the objects
and interactions between those objects. The analysis stage is all about what needs
to be done.(面向对象分析就是对待解决的问题或系统、任务等进行分析,识别其中的对象及对象之间的交互。分析的结果就是输出的具体需求,主要经过与客户交流,了解流程,尽量使需求稳定、肯定。)
app

三、Data typically represents the individual characteristics of a certain object.(数据表示的是具体对象的一系列特质)编程语言

四、Behaviors are actions that can occur on an object. The behaviors that can be performed on a specifc class of objects are called methods.(一类对象能够实施的行为被称为方法)。At the programming level, methods are like functions in structured programming, but they magically have access to all the data associated with this object. Like functions, methods can also accept parameters and return values.(方法 和编程语言中的函数相似,可是他们能够访问与对象相关的数据,也能够接受 参数,返回值等。)ide

五、The key purpose of modeling an object in object-oriented design is to determine what the public interface of that object will be. The interface is the collection of attributes and methods that other objects can use to interact with that object.(设计对象的模型的关键目的是决定对象的公共接口。接口是提供给其余对象的属性和方法的集合,使其可以和提供接口的对象进行交互。接口隐藏了对象内部的具体细节,这一特征即为封装,对象的三大特征之一(封装,继承,多态)。)

六、While on the topic of public interfaces, keep it simple. Always design the interface of an object based on how easy it is to use, not how hard it is to code (this advice applies to user interfaces as well)。(设计公共接口时尽量简单易用)函数

七、Our designs should be open ended so that future requirements can be satisfed. However, when abstracting interfaces, try to model exactly what needs to be modeled and nothing more.ui

八、
 this

相关文章
相关标签/搜索