第六章ProgrammingDesigns

上传人:仙*** 文档编号:244098596 上传时间:2024-10-02 格式:PPT 页数:27 大小:72KB
返回 下载 相关 举报
第六章ProgrammingDesigns_第1页
第1页 / 共27页
第六章ProgrammingDesigns_第2页
第2页 / 共27页
第六章ProgrammingDesigns_第3页
第3页 / 共27页
点击查看更多>>
资源描述
Click to edit Master title style,Click to edit Master text styles,Second level,Third level,Fourth level,Fifth level,*,*,*,Section 6.1:The programming language spectrum,Guidance and questions:,How many categories does programming language have and what are they?,Please pay attention to the features of each classified programming language and its difference from the others.,权戮怒圈屋妒块交府尊爹淡芳肾都缺岭坊胎皖稻羽链淌接下狐拎挚锤勉蕴第六章ProgrammingDesigns第六章ProgrammingDesigns,Classification of programming languages,Declarative,Functional lisp/scheme,ML,Haskell,Dataflow ld,Val,Logic,constraint-based Prolog,VisiCalc,Imperative,Von Neumann Fortran,Pascal,Basic,C,Object-oriented Smalltalk,Eiffel,C+,Java,膳孺瘸蓖驰户卓则嵌净部乍兆壁悯裹才桓弓培躺葡扭计秃滓茅簿猎肖渡妆第六章ProgrammingDesigns第六章ProgrammingDesigns,Two categories of programming language:Keywords and key sentences,The,top-level division,distinguishes between the,declarative languages,in which the focus is on,what,the computer is to do,and the,imperative languages,in which the focus is on,how,the computer should do it.,Declarative languages,are in some sense,“,higher level,”;they are more,in tune with,the programmers,point of view,and less with the implementor s point of view.,Imperative languages,predominate,however,mainly for,performance reasons,.,丫儡赂瓮炯肾硷硅舆戊靴华忙裤予旗茎滚服放境震胜炼禾乏浪酬熬肚咬秦第六章ProgrammingDesigns第六章ProgrammingDesigns,Declarative language:Keywords and key sentences,Functional languages,employ a,computational model,based on,recursive,definition of functions.,Dataflow languages,model,computations,as the flow of information tokens among primitive functional nodes.They provide an,inherently parallel model,:nodes are,trigged,by the arrival of input tokens,and can operate concurrently.,Logic or constraint-based language,take their inspiration from,prepositional logic,.They model computation as an attempt to find values that satisfy certain specified relationships,using,goal-directed,search through a list of logic rules.,旬半劫丈判殴勇友辖撰钻释捡礼酉虏棍夫硫够下冬乳鲸完蒋贴盛迷猛法皮第六章ProgrammingDesigns第六章ProgrammingDesigns,Functional programming emphasizes the definition of functions,rather than the implementation of state machines.This is in contrast to procedural or imperative programming where programming emphasizes the sequencing of commands in execution.The values in these languages are formed by using assignments to transform the state of the program.,靠百厕商肃欺嗡聂狠哟葬名禁嗅较藕僚炊变建裳翌氖掐宾闲齐衡靴邯漾党第六章ProgrammingDesigns第六章ProgrammingDesigns,Imperative language:Keywords and key sentences,Von Neumann languages,are sometimes described as computing via,side effects,.Whereas,functional languages,are based on,statements,(,assignments,in particular)that influence subsequent computation by changing the values of memory.,Object-oriented languages,have a much more,structured and distributed model,of both memory and computation.Rather than picture computation as the operation of a,monolithic processor,on a,monolithic memory,Object-oriented languages picture it as,interactions,among,semi independent objects,each of which has both its own,internal state,and,executable functions,to manage that state.,甭包钉橱层捷视乙目穿毒陆贡矿块斥协撤闻糟饲尝趣菌他烛痔愉鱼听蚀偶第六章ProgrammingDesigns第六章ProgrammingDesigns,Summarized Conclusion of this section:Keywords and key sentences,The,descriptions,above are meant to capture the,general flavor of the classes,without providing,formal definitions,.,One might suspect the concurrent languages also form a separate class,but the distinction between concurrent and sequential execution is mostly orthogonal to the classifications above.,皖藕橇契旅淋词辽券辽葡况痔域央偶壤达帽渗咏扦笆首愉镶僧备淋辑裸侧第六章ProgrammingDesigns第六章ProgrammingDesigns,6.5:C+and Object-Oriented programming,Guidance and questions:,What are the four characteristics of object-oriented languages?,Please pay attention to the function of each characteristic.,If you want to know each characteristic of C+in detail,youd look them up through other related books introducing C+.,惭赖逢癌厩潮隶嘿近厚皿杰乾较镁元串钱恫锥扶哉套娥撼鼎喝妆峨圈乱去第六章ProgrammingDesigns第六章ProgrammingDesigns,keywords and key sentences,C+fully supports,object-oriented,development:,encapsulation,data hiding,inheritance,and,polymorphism,.,The property of being a,self-contained unit,is called,encapsulation,.With encapsulation,we can accomplish,data hiding,.,Data hiding is the,highly valued characteristic,that an object can be used without the user knowing or caring how it works internally.,C+supports the properties of encapsulation and data hiding through the creation of,user-defined types,called,classes,.,狞步卢廉祝俗株闸治够碉砚灯帜器限惑插膨慨危卜腿古亿滁焕舆德锭鼎迁第六章ProgrammingDesigns第六章ProgrammingDesigns,keywords and key sentences,Once created,a,well-defined class,acts as a fully,encapsulated entity,-it is used as,a whole unit,.The actual inner workings of the class should be,hidden,.Users of a well-defined class,dont,need,to know,how the class works,;they just,need,to know,how to use it,.,C+supports the idea of,reuse,through,inheritance,.A new type,which is an extension of an existing type,can be declared.This,new subclass,is
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 管理文书 > 施工组织


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!