最新c++编程-外文文献.doc





《最新c++编程-外文文献.doc》由会员分享,可在线阅读,更多相关《最新c++编程-外文文献.doc(63页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、Four short words sum up what has lifted most successful individuals above the crowd: a little bit more.-author-datec+编程-外文文献江西理工大学应用科学学院附件一 外文原文Object-Orientation and C+C+ is just one of many programming languages in use today. Why are there so many languages? Why do new ones appear every few years?
2、 Programming languages have evolved to help programmers ease the transition from design to implementation. The first programming languages were very dependent on the underlying machine architecture. Writing programs at this level of detail is very cumbersome. Just as hardware engineers learned how t
3、o build computer systems out of other components, language designers also realized that programs could be written at a much higher level, thereby shielding the programmer from the details of the underlying machine. Why are there such a large number of high-level programming languages? There are lang
4、uages for accessing large inventory databases, formatting financial reports, controlling robots on the factory floor, processing lists, controlling satellites in real time, simulating a nuclear reactor, predicting changing atmospheric conditions, playing chess, and drawing circuit boards. Each of th
5、ese problems requires different sets of data structures and algorithms. Programming languages are tools to help us solve problems. However, there is not one programming language that is best for every type of problem. New programming languages are often developed to provide better tools for solving
6、a particular class of problems. Other languages are intended to be useful for a variety of problem domains and are more general purpose. Each programming language imparts a particular programming style or design philosophy on its programmers. With the multitude of programming languages available tod
7、ay, a number of such design philosophies have emerged. These design philosophies, called programming paradigms, help us to think about problems and formulate solutions.1. Software Design through ParadigmsWhen designing small computer programs or large software systems, we often have a mental model o
8、f the problem we are trying to solve. How do we devise a mental model of a software system? Programming paradigms offer many different ways of designing and thinking about software systems. A paradigm can be thought of as a mental model or as a framework for designing and describing a software syste
9、ms structure. The model helps us think about and formulate solutions. We can use the mental model of a paradigm independently from the programming language chosen for implementation. However, when the chosen language provides constructs and mechanisms that are similar to those that are found in the
10、paradigm, the implementation will be more straightforward. Usually, there are several languages that belong to a paradigm. For this reason, a programming paradigm is also considered a class of languages. A language does not have to fit into just one paradigm. More often, languages provide features o
11、r characteristics from several paradigms. Hybrid languages, such as C+, combine characteristics from two or more paradigms. C+ includes characteristics from the imperative and procedural paradigms - just like its predecessor language, C - and the object-oriented paradigm.THE IMPERATIVE PARADIGM. The
12、 imperative paradigm is characterized by an abstract model of a computer with a large memory store. This is the classic von Neumann model of computer architecture. Computations, which consist of a sequence of commands, are stored as encoding within the store. Commands enable the machine to find solu
13、tions using assignment to modify the store, variables to read the store, arithmetic and logic to evaluate expressions, and conditional branching to control the flow of execution. THE PROCEDURAL PARADIGM. The procedural paradigm includes the imperative paradigm, but extends it with an abstraction mec
14、hanism for generalizing commands and expressions into procedures. Parameters, which are essentially aliases for a portion of the store, were also introduced by this paradigm. Other features include iteration, recursion, and selection. Most mainstreams programming today is done in a procedural langua
15、ge. The procedural paradigm was the first paradigm to introduce the notion of abstraction into program design. The purpose of abstraction in programming is to separate behavior from implementation. Procedures are a form of abstraction. The procedure performs some task or function. Other parts of the
16、 program call the procedure, knowing that it will perform the task correctly and efficiently, but without knowing exactly how the procedure is implemented. THE PROCEDURAL PARADIGM WITH ADTs. DATA ABSTRACTION is concerned with separating the behavior of a data object from its representation or implem
17、entation. For example, a stack contains the operations Push, Pop, and IsEmpty. A stack object provides users with these operations, but does not reveal how the stack is actually implemented. The stack could be implemented using an array or a list. Users of the stack object do not care how the stack
18、is implemented, only that it performs the above operations correctly and efficiently. Because the underlying implementation of the data object is hidden from its users, the implementation can easily be changed without affecting the programs that use it. When we design algorithms, we often need a par
19、ticular data type to use in order to carry out the algorithms operations. The design of an algorithm is easier if we simply specify the data types of the variables, without worrying about how the actual data type is implemented. We describe the data type by its properties and operations and assume t
20、hat whatever implementation is chosen, the operations will work correctly and efficiently. Types defined in this way are called ABSTRACT DATA TYPES (ADTs). The use of abstract data types makes the design of the algorithm more general, and allows us to concentrate on the algorithm at hand without get
21、ting bogged down in implementation details. After the algorithms have been designed, the actual data types will need to be implemented, along with the algorithms. Recently, procedural languages have been extended to support the definition of new data types and provide facilities for data abstraction
22、. THE OBJECT-ORIENTED PARADIGM. The object- oriented paradigm retains much of the characteristics of the procedural paradigm, since procedures are still the primary form for composing computations. However, rather than operate on abstract values, programs in the object-oriented paradigm operate on o
23、bjects. An object is very similar to an abstract data type and contains data as well as procedures. There are three primary characteristics of the object-oriented paradigm. We have already described the first, ENCAPSULATION, the mechanism for enforcing data abstraction. The second characteristic is
24、INHERITANCE. Inheritance allows new objects to be created from existing, more general ones. The new object becomes a specialized version of the general object. New objects need only provide the methods or data that differ because of the specialization. When an object is created (or derived) from ano
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 最新 c+ 编程 外文 文献

限制150内