博客首页 注册 建议与交流 排行榜 加入友情链接         宝宝相册的专门空间
推荐 投诉 搜索: 帮助

我的小屋-----I love it

我的小天地,我的心灵之地
  ppzhang.cublog.cn

关于作者
姓名:ppzhang
职业:学生
年龄:20
位置:
个性介绍:
相互学习,相互交流,希望成为好朋友!
|| << >> ||
我的分类


《<面向对象知多少?>之<什么是面向对象编程>》
摘要1---出处(维基)  http://en.wikipedia.org/wiki/Object_oriented

【外文资料的引入和理解】

   Object-oriented programming (OOP) is a programming paradigm that uses "objects" and their interactions to design applications and computer programs. Programming techniques may include features such as, encapsulation, modularity, polymorphism, and inheritance. It was not commonly used in mainstream software application development until the early 1990s. Many modern programming languages now support OOP.】

上面是对面向对象编程的一个简介
 Introduction
  Object-oriented programming can trace its roots to the 1960s. As hardware and software became increasingly complex, researchers studied ways in which software quality could be maintained. Object-oriented programming was deployed in part as an attempt to address this problem by strongly emphasizing discrete units of programming logic and re-usability in software.

    The Simula programming language was the first to introduce the concepts underlying object-oriented programming (objects, classes, subclasses, virtual methods, coroutines, garbage collection, and discrete event simulation) as a superset of Algol. Simula was used for physical modeling, such as models to study and improve the movement of ships and their content through cargo ports. Smalltalk was the first programming language to be called "object-oriented".

Object-oriented programming may be seen as a collection of cooperating objects, as opposed to a traditional view in which a program may be seen as a group of tasks to compute ("subroutines"). In OOP, each object is capable of receivin messages, processing data, and sending messages to other objects.

       Each object can be viewed as an independent little machine with a distinct role or responsibility. The actions or "operators" on the objects are closely associated with the object. For example, in OOP, the data structures tend to carry their own operators around with them (or at least "inherit" them from a similar object or "class"). The traditional approach tends to view and consider data and behavior separately.

上面是对面向对象编程的一个小回顾(拿来想让大家了解一下Object-oriented programming ‘s background

Fundamental concepts
Class 
      Defines the abstract characteristics of a thing (object), including the thing's characteristics (its attributes, fields or properties) and the thing's behaviors (the things it can do, or methods, operations or features).
Object 
     A particular object. The class of Dog defines all possible dogs by listing the characteristics and behaviors they can have; the object Lassie is one particular dog, with particular versions of the characteristics. A Dog has fur; Lassie has brown-and-white fur.
Instance 
     One can have an instance of a class or a particular object. The instance is the actual object created at runtime.
Method 
    An object's abilities. In language, methods are verbs.
Message passing 
“The process by which an object sends data to another object or asks the other object to invoke a method.”
Inheritance 
‘Subclasses’ are more specialized versions of a class, which inherit attributes and behaviors from their parent classes, and can introduce their own.

Encapsulation 
    Encapsulation conceals the functional details of a class from objects that send messages to it.
Abstraction 
    Abstraction is simplifying complex reality by modelling classes appropriate to the problem, and working at the most appropriate level of inheritance for a given aspect of the problem.
Polymorphism 
Polymorphism allows you to treat derived class members just like their parent class' members. More precisely, Polymorphism in object-oriented programming is the ability of objects belonging to different data types to respond to method calls of methods of the same name, each one according to an appropriate type-specific behavior.

上面主要讲解了面向对象编程中的基本内容和要素。

以上是面向对象的大概的介绍。

在此说明一下,因为我们学的计算机专业,所以大家能尽量地学着看一下外文的书籍(主要是英文)。这样对我们理解一下主要的概念时候,能够很好的帮助作用,因为我们都是翻译的有些词是缩写的,我们有时只是知道一下名词,但是并不知道他的实质是什么东西

发表于: 2008-05-16,修改于: 2008-05-16 17:31,已浏览81次,有评论0条 推荐 投诉


网友评论
 发表评论