ImageVerifierCode 换一换
格式:DOC , 页数:19 ,大小:74KB ,
资源ID:4710749      下载积分:5 金币
验证码下载
登录下载
邮箱/手机:
验证码: 获取验证码
温馨提示:
支付成功后,系统会自动生成账号(用户名为邮箱或者手机号,密码是验证码),方便下次登录下载和查询订单;
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/4710749.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  
声明  |  会员权益     获赠5币     写作写作

1、填表:    下载求助     留言反馈    退款申请
2、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
3、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
4、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
5、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前自行私信或留言给上传者【二***】。
6、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
7、本文档遇到问题,请及时私信或留言给本站上传会员【二***】,需本站解决可联系【 微信客服】、【 QQ客服】,若有其他问题请点击或扫码反馈【 服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【 版权申诉】”(推荐),意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:4008-655-100;投诉/维权电话:4009-655-100。

注意事项

本文(c++编程-外文文献.doc)为本站上传会员【二***】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4008-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

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

1、 附件一 外文原文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? Programming languages have evolved to help programmers ease the transition from design to implementation. The first programming langua

2、ges were very dependent on the underlying machine architecture. Writing programs at this level of detail is very cumbersome. Just as hardware engineers learned how to build computer systems out of other components, language designers also realized that programs could be written at a much higher leve

3、l, 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 languages for accessing large inventory databases, formatting financial reports, controlling robots on the factory floor, processing lists,

4、 controlling satellites in real time, simulating a nuclear reactor, predicting changing atmospheric conditions, playing chess, and drawing circuit boards. Each of these problems requires different sets of data structures and algorithms. Programming languages are tools to help us solve problems. Howe

5、ver, 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 a particular class of problems. Other languages are intended to be useful for a variety of problem domains and are more general purpose

6、. Each programming language imparts a particular programming style or design philosophy on its programmers. With the multitude of programming languages available today, a number of such design philosophies have emerged. These design philosophies, called programming paradigms, help us to think about

7、problems and formulate solutions.1. Software Design through ParadigmsWhen designing small computer programs or large software systems, we often have a mental model of the problem we are trying to solve. How do we devise a mental model of a software system? Programming paradigms offer many different

8、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 systems structure. The model helps us think about and formulate solutions. We can use the mental model of a paradigm independently from the

9、programming language chosen for implementation. However, when the chosen language provides constructs and mechanisms that are similar to those that are found in the paradigm, the implementation will be more straightforward. Usually, there are several languages that belong to a paradigm. For this rea

10、son, 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 or characteristics from several paradigms. Hybrid languages, such as C+, combine characteristics from two or more paradigms. C+ includes

11、 characteristics from the imperative and procedural paradigms - just like its predecessor language, C - and the object-oriented paradigm.THE IMPERATIVE PARADIGM. The imperative paradigm is characterized by an abstract model of a computer with a large memory store. This is the classic von Neumann mod

12、el of computer architecture. Computations, which consist of a sequence of commands, are stored as encoding within the store. Commands enable the machine to find solutions using assignment to modify the store, variables to read the store, arithmetic and logic to evaluate expressions, and conditional

13、branching to control the flow of execution. THE PROCEDURAL PARADIGM. The procedural paradigm includes the imperative paradigm, but extends it with an abstraction mechanism for generalizing commands and expressions into procedures. Parameters, which are essentially aliases for a portion of the store,

14、 were also introduced by this paradigm. Other features include iteration, recursion, and selection. Most mainstreams programming today is done in a procedural language. The procedural paradigm was the first paradigm to introduce the notion of abstraction into program design. The purpose of abstracti

15、on 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 program call the procedure, knowing that it will perform the task correctly and efficiently, but without knowing exactly how the proce

16、dure is implemented. THE PROCEDURAL PARADIGM WITH ADTs.DATA ABSTRACTION is concerned with separating the behavior of a data object from its representation or implementation. For example, a stack contains the operations Push, Pop, and IsEmpty. A stack object provides users with these operations, but

17、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 is implemented, only that it performs the above operations correctly and efficiently. Because the underlying implementation of the data

18、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 particular data type to use in order to carry out the algorithms operations. The design of an algorithm is easier if we simply specify the

19、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 that whatever implementation is chosen, the operations will work correctly and efficiently. Types defined in this way are called ABSTRACT

20、 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 getting bogged down in implementation details. After the algorithms have been designed, the actual data types will need to be implemented,

21、along with the algorithms. Recently, procedural languages have been extended to support the definition of new data types and provide facilities for data abstraction. THE OBJECT-ORIENTED PARADIGM. The object- oriented paradigm retains much of the characteristics of the procedural paradigm, since proc

22、edures are still the primary form for composing computations. However, rather than operate on abstract values, programs in the object-oriented paradigm operate on objects. An object is very similar to an abstract data type and contains data as well as procedures. There are three primary characterist

23、ics of the object-oriented paradigm. We have already described the first, ENCAPSULATION, the mechanism for enforcing data abstraction. The second characteristic is INHERITANCE. Inheritance allows new objects to be created from existing, more general ones. The new object becomes a specialized version

24、 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 another object, it is said to inherit the methods and data of the parent object, and includes any new representations and new or revised me

25、thods added to it. The third and final characteristic of object-oriented programming is POLYMORPHISM. Polymorphism allows many different types of objects to perform the same operation by responding to the same message. For example, we may have a collection of objects which can all perform a sort ope

26、ration. However, we do not know what types of objects will be created until run-time. Object-oriented languages contain mechanisms for ensuring that each sort message is sent to the right object. Encapsulation, inheritance, and polymorphism are considered the fundamental characteristics of object-or

27、iented programming and all object-oriented languages must provide these characteristics in some way. Not surprisingly, languages support these characteristics in very different ways. Smalltalk, C+, Objective-C, and Lisp with CLOS (the Common Lisp Object System) are all examples of object-oriented la

28、nguages, and each provides support for encapsulation, inheritance, and polymorphism. Constructing an object-oriented program involves determining the objects that are needed to solve the problem. The objects are then used to construct computations that define the behavior of the software system. Mes

29、sage passing is the fundamental interaction mechanism among objects. Messages (from other objects or programs) are sent to objects to inform them to perform one of their operations. Objects are responsible for maintaining the state of their data. Only the object may modify its internal data. Objects

30、 may themselves be implemented via other sub-objects. Implementing an object involves a recursive process of breaking it into sub-objects until at some level the objects and methods defined on them are primitives. At this point, the methods and data consist of elements that can be implemented using

31、the basic constructs provided by the programming language. One of the most important aspects of the object-oriented paradigm is how it changes our way of thinking about software systems. Systems are thought of as consisting of individual entities that are responsible for carrying out their own opera

32、tions. Each object is conceived and implemented as self-contained. Such a model facilitates software design (and later implementation) because objects often model conceptual real-world entities. Designing systems using the object-oriented paradigm results in software systems that behave and appear m

33、ore like their real-life counterparts. 2. The Object-Oriented Characteristics of C+ENCAPSULATION in C+. C+ extends C with a facility for defining new data types. A class is like a C struct, but contains data as well as methods. In addition, C+ provides different levels of access to the members of a

34、class in order to control how the members of a class can be manipulated from outside the class. Recall that the importance of data abstraction is to hide the implementation details of a data object from the user. The user only accesses the object through its PUBLIC INTERFACE. A C+ class consists of

35、a public and private part. The public part provides the interface to the users of the class, while the private part can only be used by the functions that make up the class. C+ provides keywords to indicate which members of a class are hidden and which are part of its public interface. The members o

36、f the hidden implementation are marked in sections beginning with the keyword private. The public interface part of the class follows the keyword public. By default, the declarations within a class are private, meaning that only the member functions (and friends) of the class have access to them. A

37、class definition does not allocate any memory. Memory is allocated when an array object is created through a variable declaration. Constructors and destructors provide the initialization and clean up of an object. When an object is declared, the constructor is called to initialize the memory used by

38、 the object. The destructor performs any clean-up for the object when the object goes out of scope and is destroyed.Note that we didnt really hide the implementation details from the user. C+ does not provide a way to completely exclude all of the details of the underlying implementation, since the

39、private part of the class must be included with the class definition it is useful to relax the access to variables within a class, particularly under inheritance. Often derived classes need easy access to the private members of their parent classes. C+ defines the keyword protected for this purpose.

40、 Protected members can be accessed by the member functions of a class as well as by member functions of derived classes. However, like private members, protected members cannot be accessed by user programs. One final note about objects. Recall that message passing is the fundamental means for commun

41、ication among objects. When we write i a2.Size() we are effectively sending a message to the a2 array object to determine the size of the array and return it. In actuality, no message is really sent. C+ emulates message passing through the use of function calls. The compiler ensures us that the corr

42、ect function will be called for the desired object. So, in C+ you can think of message passing as function calls. Object-orientation has become a buzzword with many meanings. It is a design methodology, a paradigm (a way of thinking about problems and finding solutions), and a form of programming. A

43、s a design methodology, we can use object-oriented techniques to design software systems. But it is more than a design methodology, it is a whole new way of thinking about problems. Object-oriented design allows us to think about the actual real-world entities of the problem we are attempting to pro

44、vide a solution for. Beginning the design with concepts from the real- world problem domain allows the same concepts to be carried over to implementation, making the design and implementation cycle more seamless. Once a design has been conceived, a programming language can be chosen for implementati

45、on. By factoring out the inheritance relationships from the object hierarchies discovered during design, one can even implement the system in a traditional, non- object-oriented language. However, using an object-oriented language, such as C+, makes it easier to realize the design into an implementa

46、tion because the inherent relationships among objects can be directly supported in the language. Languages such as C+ are considered hybrid languages because they are multi-paradigm languages. C+ is an object- oriented extension of C and can be used as a procedural language or as an object-oriented

47、language. In this issue, we continue our tour of the object-oriented features of C+. 3. The Object-Oriented Features of C+INHERITANCE in C+. One of the major strengths of any object-oriented programming language is the ability to build other classes from existing classes, thereby reusing code. Inher

48、itance allows existing types to be extended to an associated collection of sub-types. Recall that one of the key actions of object-oriented design is to identify real-world entities and the relationships among them. When a software system is designed, a variety of objects arise, which may be related

49、 in one way or another. Some classes may not be related at all. Many times it makes sense to organize the object classes into an inheritance hierarchy. Organizing a set of classes into a class hierarchy requires that we understand the relationships among the classes in detail. Not all class relationships dictate that inheritance be used. C+ provides three forms of inheritance: public, private, and protected. These different forms

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服