计算机专业英语Unit-4-Programming-Language课件.pptx

上传人(卖家):三亚风情 文档编号:3025519 上传时间:2022-06-23 格式:PPTX 页数:35 大小:5.49MB
下载 相关 举报
计算机专业英语Unit-4-Programming-Language课件.pptx_第1页
第1页 / 共35页
计算机专业英语Unit-4-Programming-Language课件.pptx_第2页
第2页 / 共35页
计算机专业英语Unit-4-Programming-Language课件.pptx_第3页
第3页 / 共35页
计算机专业英语Unit-4-Programming-Language课件.pptx_第4页
第4页 / 共35页
计算机专业英语Unit-4-Programming-Language课件.pptx_第5页
第5页 / 共35页
点击查看更多>>
资源描述

1、Unit 4 Programming LanguageSection A Programming Language OverviewComputer EnglishBackground Knowledge 背景知识背景知识v 计算机使用二进制语言,与人类使用的自然语言差别较大。计算机使用二进制语言,与人类使用的自然语言差别较大。为了让计算机能理解为了让计算机能理解人类指令人类指令并正确去完成相应的任务需并正确去完成相应的任务需要借助于程序设计语言。要借助于程序设计语言。v 程序语言的类别很多,在发展的历程上也经历了机器语言、程序语言的类别很多,在发展的历程上也经历了机器语言、汇编语言和高级语言

2、等若干阶段。汇编语言和高级语言等若干阶段。Computer EnglishNew words and useful expressionsgeneration /denrein /代,一代, 产生, 一世syntax / sintks /语法; 有条理的排列; 句法primitive / prmtv /原始的, 旧式的, 上古的symbolic / smblk /用符号的(用作符号的)neural / njurl /神经的; 背侧的; 神经中枢的imitate / mtet /模仿, 冒充, 效法switch/ swt /开关, 转换; 转换器;instruction/ nstrkn /指示;

3、 指令; 用法说明Computer EnglishComputer EnglishComputer EnglishNew words and useful expressionstime-consuming费时间error-prone易错human-friendly友好的,人容易理解的scripting language脚本语言parent class父类embedded application嵌入式应用Computer EnglishContentsProgramming Languages Level2Procedural Oriented Programming4Object Orien

4、ted Programming5Programming Paradigms3Five Generation of Languages1L o g oL o g oFirst generation languages(1GL)v Represent the very early, primitive computer languages that consisted entirely of 1s and 0s - the actual language that the computer understands (machine language). L o g oL o g oSecond g

5、eneration languages(2GL)v Represent a step up from the first generation languages. v Allow for the use of symbolic names instead of just numbers. v Second generation languages are known as assembly language. v Code written in an assembly language is converted into machine language (1GL). L o g oL o

6、g oThird generation languages(3GL)v Words and commands were being used. v Have syntax that was much easier to understand. v include C, C+, Java, and JavaScript, among others. L o g oL o g ovThe syntax used in 4GL is very close to human language, an improvement from the previous generation of languag

7、es. vTypically used to access databases. For example, SQL and ColdFusion. Fourth generation languages (4GL)L o g oL o g ovDesigned to make the computer solve a given problem without the programmer.vUsed for neural networks(a form of artificial intelligence that attempts to imitate how the human mind

8、 works).vFor Example: Prolog, OPS5, and Mercury.Fifth generation languages (5GL)L o g oL o g oContentsProgramming Languages Level2Procedural Oriented Programming4Object Oriented Programming5Programming Paradigms3Five Generation of Languages1L o g oL o g oMachine Languagev machine code instructions w

9、ritten as strings of binary digits (bits). v The programming language used was known as binary code.v Very difficult to work with due to the absence of symbolic information.L o g oL o g oAssembly Languagev consisted of the set of mnemonics needed to represent the complete instruction set used by a p

10、articular CPU. v Need to be converted into machine code in order for the computer to execute the program instructions, and this was carries out by a program called an assembler. v Used today mainly for embedded applications where there is a requirement for compact and efficient code, and where the a

11、mount of memory available may be limited.L o g oL o g oHigh-level languagesv More human-friendly programming languages began to emerge that allowed programs to be written using English-like commands. v Need to convert into machine code first for computer to understand.L o g oL o g oHigh-level Langua

12、ges Executionv Two approaches have been used to make the conversion.CompilerInterpreterconvert the high-level code into machine code before the program is loaded into the computers working memory.convert each high-level program instruction into machine code at run time.- execution tends to be slower

13、. L o g oL o g oFORTRANv Originally developed by IBM in 1954v Good at carrying out large numbers of complex calculations, and is designed for use in scientific and engineering applicationsv In widespread use and has continued to evolve.L o g oL o g oCOBOLv COBOL (Common Business-Oriented Language) w

14、as designed specifically for use in business, financial and administrative applications.v Approximately 75% of the worlds business is transacted on systems written in COBOL. v Development and standardization of the language is now primarily managed by the International Standards Organization (ISO).G

15、race HopperL o g oL o g oOther High-level Languagesv Specialized languages such as LISP and Prolog (used for applications involving artificial intelligence) v More general-purpose languages such as C, C+, Perl, Java and Visual Basic.L o g oL o g oContentsProgramming Languages Level2Procedural Orient

16、ed Programming4Object Oriented Programming5Programming Paradigms3Five Generation of Languages1L o g oL o g oProgramming Languages Common Featuresv Input - get data from an input device such as a disk drive or the keyboardv Output - send data to an output device such as a disk drive, visual display u

17、nit, printer or network adapterv Arithmetic and logic - perform arithmetic operations such as addition and multiplication, and logical operations such as comparing the value of two variablesL o g oL o g oProgramming Languages Common Features-Continuev Conditional execution - execute a different set

18、of program instructions depending on whether a specified condition is true or falsev Repetition - execute a set of program instructions repeatedly until some exit condition evaluates to true (a conditional loop) or for a specified number of iterations (a counting loop)L o g oL o g oContentsProgrammi

19、ng Languages Level2Procedural Oriented Programming4Object Oriented Programming5Programming Paradigms3Five Generation of Languages1L o g oL o g oProcedural Oriented ProgrammingvA structured programming paradigm based on the concept of procedure calls.vThe procedures may be subroutines, methods or fun

20、ctions, each of which consists of a collection of program statements that are executed sequentially in order to carry out a specific task.L o g oL o g oProcedural Oriented Programming Meritsv Merits: Allow the same code to be re-used repeatedly.v Avoid the need to use the GOTO or JUMP statements fou

21、nd in unstructured languages avoid spaghetti code.v Suited to modularization.- reduce the overall complexity of a large application by organizing the applications code into related functional units. L o g oL o g oContentsProgramming Languages Level2Procedural Oriented Programming4Object Oriented Pro

22、gramming5Programming Paradigms3Five Generation of Languages1L o g oL o g oObject Oriented Programmingv A programming paradigm that uses objects to model data entities.v Places the emphasis on the data rather than on the functions carried out by the program.v Objects interact with the applications us

23、ers and with each other by sending and receiving messages.(The messages to which an object will respond are defined by the objects interface)L o g oL o g oObject Oriented Programming Componentsv Class variables - belong to the class as a whole; there is only one copy of each one.v Instance variables

24、 or attributes - data that belongs to individual objects; every object has its own copy of each one.v Member variables - refers to both the class and instance variables that are defined by a particular classL o g oL o g oObject Oriented Programming Components-Continuev Class methods - belong to the

25、class as a whole and have access only to class variables and inputs from the procedure callv Instance methods - belong to individual objects, and have access to instance variables for the specific object they are called on, inputs, and class variablesL o g oL o g oEncapsulationv An objects member va

26、riables are declared as private, and can only be accessed or modified by the objects own methods.v The methods themselves are usually declared to be public, but the manner in which they may be invoked is strictly defined by the objects interface.v Encapsulation: The ability to hide both the data and

27、 the code implementation of an object behind the objects interface.L o g oL o g oInheritancev each object is derived from a template object called a class. The class defines the member variables, methods, and interface for each object created from it.v subclasses would inherit the member variables,

28、methods and interface of the parent class.v The ability of a subclass to inherit the characteristics of its parent class in this way is called inheritance.L o g oL o g oPolymorphismv When calling code can be agnostic as to whether an object belongs to a parent class or one of its descendants. For ex

29、ample, a function might call make_full_name() on an object, which will work whether the object is of class Person or class Employee. L o g oL o g oObject Oriented Programming Examplev Simula is generally thought to be the first programming language to display object-oriented characteristicsv The fir

30、st truly object-oriented language is held by many to be Smalltalk.L o g oL o g oObject Oriented Programming Gaining Popularityv It was not until the 1990s that object-oriented programming emerged as the predominant programming paradigm, probably due to the rise in popularity of the graphical user interface (GUI), for which an object-oriented approach is ideally suited.GUI

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 办公、行业 > 各类PPT课件(模板)
版权提示 | 免责声明

1,本文(计算机专业英语Unit-4-Programming-Language课件.pptx)为本站会员(三亚风情)主动上传,163文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
2,用户下载本文档,所消耗的文币(积分)将全额增加到上传者的账号。
3, 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(发送邮件至3464097650@qq.com或直接QQ联系客服),我们立即给予删除!


侵权处理QQ:3464097650--上传资料QQ:3464097650

【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。


163文库-Www.163Wenku.Com |网站地图|