欢迎来到三一办公! | 帮助中心 三一办公31ppt.com(应用文档模板下载平台)
三一办公
全部分类
  • 办公文档>
  • PPT模板>
  • 建筑/施工/环境>
  • 毕业设计>
  • 工程图纸>
  • 教育教学>
  • 素材源码>
  • 生活休闲>
  • 临时分类>
  • ImageVerifierCode 换一换
    首页 三一办公 > 资源分类 > PPT文档下载  

    计算机专业英语Unit04 Programming and Simulation课件.ppt

    • 资源ID:1596388       资源大小:332.50KB        全文页数:60页
    • 资源格式: PPT        下载积分:16金币
    快捷下载 游客一键下载
    会员登录下载
    三方登录下载: 微信开放平台登录 QQ登录  
    下载资源需要16金币
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    计算机专业英语Unit04 Programming and Simulation课件.ppt

    Unit 4 Software DevelopmentSection A Computer Program,2/56,Computer Program-Introduction,I.IntroductionA computer program is a set of instructions that directs a computer to perform some processing function or combination of functions. For the instructions to be carried out, a computer must execute a program, that is, the computer reads the program, and then follows the steps encoded in the program in a precise order until completion.,I. 引言 计算机程序是指挥计算机执行某种处理功能或功能组合的一套指令。要使指令得到执行,计算机必须执行程序,也就是说,计算机要读取程序,然后按准确的顺序实施程序中编码的步骤,直至程序结束.,3/56,Computer Program-Introduction,A program can be executed many different times, with each execution yielding a potentially different result depending upon the options and data that the user gives the computer.,一个程序可多次执行,而且,取决于用户提供给计算机的选项和数据,每次执行可能产生不同的结果。,Yield: vt. 生产,释放,让步The child pleaded, but the parents wouldnt yield.,4/56,Computer Program-Introduction,Programs fall into two major classes: application programs and operating systems. An application program is one that carries out some function directly for a user, such as word processing or game playing.,程序分为两大类:应用程序和操作系统。应用程序直接为用户执行某种功能,如处理文字或玩游戏.,5/56,Computer Program-Introduction,An operating system is a program that manages the computer and the various resources and devices connected to it, such as RAM (random access memory) , hard drives, monitors, keyboards, printers, and modems, so that they may be used by other programs. Examples of operating systems are DOS, Windows 95, OS/2, and UNIX.,操作系统管理计算机以及与之相连的各种资源和设备,如随机存储器、硬盘驱动器、监视器、键盘、打印机和调制解调器,以便其他程序可以使用它们。操作系统的例子包括:DOS、Windows 95、OS/2和UNIX。,6/56,Computer Program-Program Development,II. Program Development Software designers create new programs by using special applications programs, often called utility programs or development programs. A programmer uses another type of program called a text editor to write the new program in a special notation called a programming language.,II. 程序开发软件设计者通过特殊的应用程序来开发新程序,这些应用程序常被称作实用程序或开发程序。程序员使用称作文本编辑器(程序)的另一种程序,来以称作编程语言的特殊符号编写新程序。,Notation: 标记,符号 figure notation数字标记 binary notation 二进制计数法,7/56,Computer Program-Program Development,With the text editor, the programmer creates a text file, which is an ordered list of instructions, also called the program source file. The individual instructions that make up the program source file are called source code.,使用文本编辑器,程序员创建一个文本文件,这个文本文件是一个有序指令表,也称为程序源文件。构成程序源文件的单个指令被称为源代码。,Make up: 编制;弥补;化妆 she is very much made up.Makeup: 化妆品;组成成分,构成方式。 Sb. put on their makeups.,8/56,Computer Program-Program Development,At this point, a special applications program translates the source code into machine language, or object code a format that the operating system will recognize as a proper program and be able to execute.,在这个时候,一种专门的应用程序将源代码翻译成机器语言或目标代码操作系统将认作真正程序并能够执行的一种格式。,9/56,Computer Program-Program Development,Three types of applications programs translate from source code to object code: compilers, interpreters, and assemblers. The three operate differently and on different types of programming languages, but they serve the same purpose of translating from a programming language into machine language.,将源代码翻译成目标代码的应用程序有3种:编译器(程序)、解释器(程序)和汇编器(程序)。这3种应用程序在不同类型的编程语言上执行不同的操作,但是它们都起到将编程语言翻译成机器语言的相同目的。,10/56,Computer Program-Program Development,A compiler translates text files written in a high-level programming languagesuch as FORTRAN, C, or Pascalfrom the source code to the object code all at once. This differs from the approach taken by interpreted languages such as BASIC, in which a program is translated into object code statement by statement as each instruction is executed.,编译程序将使用FORTRAN、C和Pascal等高级编程语言编写的文本文件一次性从源代码翻译成目标代码。这不同于BASIC等解释执行的语言所采取的方式,在解释执行的语言中程序是随着每条指令的执行而逐个语句地翻译成目标代码的。,11/56,Computer Program-Program Development,The advantage of interpreted languages is that they can begin executing the program immediately instead of having to wait for all of the source code to be compiled. Changes can also be made to the program fairly quickly without having to wait for it to be compiled again.,解释执行的语言的优点是,它们可以立即开始执行程序,而不需要等到所有的源代码都得到编译。对程序的更改也可以相当快地作出,而无需等到重新编译整个程序。,Fairly: 公平地 I think I was fairly treated by the police;相当地 This is a fairly easy book;完全的,简直 It fairly destroyed the machine.,12/56,Computer Program-Program Development,The disadvantage of interpreted languages is that they are slow to execute, since the entire program must be translated one instruction at a time, each time the program is run. On the other hand, compiled languages are compiled only once and thus can be executed by the computer much more quickly than interpreted languages.,解释执行的语言的缺点是,它们执行起来慢,因为每次运行程序,都必须对整个程序一次一条指令地翻译。另一方面,编译执行的语言只编译一次,因此计算机执行起来可比解释执行的语言快得多,13/56,Computer Program-Program Development,For this reason, compiled languages are more common and are almost always used in professional and scientific applications.,由于这个原因,编译执行的语言比解释执行的语言常用,而且,在专业和科学领域几乎总是应用编译执行的语言。,14/56,Computer Program-Program Development,Another type of translator is the assembler, which is used for programs or parts of programs written in assembly language. Assembly language is another programming language, but it is much more similar to machine language than other types of high-level languages.,另一种翻译程序是汇编程序,它用于以汇编语言编写的程序或程序组成部分。汇编语言也是一种编程语言,但它远比其他类型的高级语言类似于机器语言,15/56,Computer Program-Program Development,In assembly language, a single statement can usually be translated into a single instruction of machine language. Today, assembly language is rarely used to write an entire program, but is instead most often used when the programmer needs to directly control some aspect of the computers function.,在汇编语言中,一个语句通常可以翻译成机器语言的一条指令。今天,汇编语言很少用来编写整个程序,而是最常用于程序员需要直接控制计算机某方面功能的情况下。,16/56,Computer Program-Program Development,Programs are often written as a set of smaller pieces, with each piece representing some aspect of the overall application program. After each piece has been compiled separately, a program called a linker combines all of the translated pieces into a single executable program.,程序经常被编写作一套较小的程序段,每段代表整个应用程序的某个方面。各段独立编译之后,一种被称为连接程序的程序将所有编译好的程序段组合成一个可以执行程序。,Overall: adj. 总体的,全面考虑的,We did an overall consideration of the matter at last. 全盘的考虑,17/56,Computer Program-Program Development,Programs seldom work correctly the first time, so a program called a debugger is often used to help find problems called bugs. Debugging programs usually detect an event in the executing program and point the programmer back to the origin of the event in the program code.,程序很少有第一次能够正确运行的,所以一种被称为调试程序的程序常被用来帮助查找被称为程序错误的问题。调试程序通常在运行的程序中检测到一个事件,并向程序员指引到事件在程序代码中的起源处。,18/56,Computer Program-Program Development,Recent programming systems, such as Java, use a combination of approaches to create and execute programs. A compiler takes a Java source program and translates it into an intermediate form. Such intermediate programs are then transferred over the Internet into computers where an interpreter program then executes the intermediate form as an application program.,最近出现的编程系统,如Java,采取多种方法相结合的方式创建和执行程序。编译器(程序)取来Java源程序,并将其翻译成中间形式。这样的中间程序随后通过因特网传送给计算机,而这些计算机里的解释程序接下来将中间程序作为应用程序来执行。,19/56,Computer Program- Program Elements,III Program Elements Most programs are built from just a few kinds of steps that are repeated many times in different contexts and in different combinations throughout the program. The most common step performs some computation, and then proceeds to the next step in the program, in the order specified by the programmer.,III 程序元素大多数程序只是由少数几种步骤构成,这些步骤在整个程序中在不同的上下文和以不同的组合方式多次重复。最常见的步骤执行某种计算,然后按照程序员指定的顺序,进入程序的下一个步骤。,20/56,Computer Program-Program Elements,Programs often need to repeat a short series of steps many times, for instance in looking through a list of game scores and finding the highest score. Such repetitive sequences of code are called loops.,程序经常需要多次重复不长的一系列步骤,例如,浏览游戏得分表,从中找出最高得分。这种重复的代码序列称为循环。,21/56,Computer Program-Program Elements,One of the capabilities that make computers so useful is their ability to make conditional decisions and perform different instructions based on the values of data being processed. If-then-else statements implement this function by testing some piece of data and then selecting one of two sequences of instructions on the basis of the result.,计算机所具有的使其如此有用的能力之一,就是它们能够作出条件判定,并根据正在处理的数据的值执行不同的指令。if-then-else(如果则否则)语句通过测试某个数据段,然后根据结果从两个指令序列中选出一个,来执行这个功能。,22/56,Computer Program-Program Elements,One of the instructions in these alternatives may be a goto statement that directs the computer to select its next instruction from a different part of the program. For example, a program might compare two numbers and branch to a different part of the program depending on the result of the comparison:,这些选择对象中的指令之一可能是一个goto语句,用以指引计算机从程序的另一个部分选择下一条指令。例如,一个程序可能比较两个数,并视比较结果而分支到程序的另一个部分:,23/56,Computer Program-Program Elements,If x is greater than ythengoto instruction #10else continue,24/56,Computer Program-Program Elements,Programs often use a specific sequence of steps more than once. Such a sequence of steps can be grouped together into a subroutine, which can then be called, or accessed, as needed in different parts of the main program.,程序经常不止一次地使用特定的一系列步骤。这样的一系列步骤可以组合成一个子例程(序),而子例程根据需要可在主程序的不同部分进行调用或访问。,25/56,Computer Program-Program Elements,Each time a subroutine is called, the computer remembers where it was in the program when the call was made, so that it can return there upon completion of the subroutine. Preceding each call, a program can specify that different data be used by the subroutine, allowing a very general piece of code to be written once and used in multiple ways.,每次调用一个子例程,计算机都会记住它自己在该调用发生时处在程序的那个位置,以便在运行完该子例程后还能够回到那里。在每次调用之前,程序可以指定子例程使用不同的数据,从而做到一个通用性很强的代码段只编写一次,而被以多种方式使用。,Preceding: 在前的,在先的 in the preceding chapter 在前一章,26/56,Computer Program-Program Elements,Most programs use several varieties of subroutines. The most common of these are functions, procedures, library routines, system routines, and device drivers. Functions are short subroutines that compute some value, such as computations of angles, which the computer cannot compute with a single basic instruction.,大多数程序使用几种不同的子例程。其中最常用的是函数、过程、库例程、系统例程以及设备驱动程序。函数是一种短的子例程,用来计算某个值,如角的计算,而该值计算机仅用一条基本指令无法计算.,27/56,Computer Program-Program Elements,Procedures perform a more complex function, such as sorting a set of names. Library routines are subroutines that are written for use by many different programs. System routines are similar to library routines but are actually found in the operating system.,过程执行的是比较复杂的功能,如给一组名字排序。库例程是为多种不同程序使用而编写的子例程。系统例程类似于库程序,但实际上用于操作系统,28/56,Computer Program-Program Elements,They provide some service for the application programs, such as printing a line of text. Device drivers are system routines that are added to an operating system to allow the computer to communicate with a new device, such as a scanner, modem, or printer.,它们为应用程序提供某种服务,如打印一行文字。设备驱动程序是一些系统例程,它们加到操作系统中,以使计算机能够与扫描仪、调制解调器或打印机等新设备通信。,29/56,Computer Program-Program Elements,Device drivers often have features that can be executed directly as applications programs. This allows the user to directly control the device, which is useful if, for instance, a color printer needs to be realigned to attain the best printing quality after changing an ink cartridge.,设备驱动程序常常具有可以作为应用程序直接执行的特征。这样就使用户得以直接控制该设备。这一点很有用,例如,在彩色打印机更换墨盒后,需要重新调整以达到最佳打印质量的情况下。,30/56,Computer Program-Program Function,Program Function Modern computers usually store programs on some form of magnetic storage media that can be accessed randomly by the computer, such as the hard drive disk permanently located in the computer, or a portable floppy disk.,程序功能 现代计算机通常将程序存储在计算机可以随机访问的某种形式的磁性存储介质上,如固定放在计算机中的硬盘或者便携式的软盘。,31/56,Computer Program-Program Function,Additional information on such disks, called directories, indicates the names of the various programs on the disk, when they were written to the disk, and where the program begins on the disk media.,这些磁盘上被称为目录的额外信息,指明盘上各种程序的名称、它们写入盘中的时间以及它们在磁盘介质上的开始位置。,32/56,Computer Program-Program Function,When a user directs the computer to execute a particular application program, the operating system looks through these directories, locates the program, and reads a copy into RAM. The operating system then directs the CPU (central processing unit) to start executing the instructions at the beginning of the program.,当用户命令计算机执行一个特定应用程序时,操作系统就浏览这些目录,找到程序,并将一个副本读入随机存储器。操作系统然后命令中央处理器在程序的起始位置开始执行指令。,33/56,Computer Program-Program Function,Instructions at the beginning of the program prepare the computer to process information by locating free memory locations in RAM to hold working data, retrieving copies of the standard options and defaults the user has indicated from a disk, and drawing initial displays on the monitor.,程序起始位置的指令为计算机处理信息作好准备,其方法是在随机存储器中找到闲置内存位置来容纳工作数据,从盘中取回用户指出的标准方式选项和默认值的副本,并在监视器上绘制初始显示。,34/56,Computer Program-Program Function,The operating system converts any data so entered into a standard internal form. The application then uses this information to decide what to do nextfor example, perform some desired processing function such as reformatting a page of text, or obtain some additional information from another file on a disk.,操作系统将如此输入的任何数据都转换成标准的内部形式。应用程序然后使用该信息决定下一步干什么,如执行某项期望的处理功能像重新格式化一页文本或从盘上的另一个文件获取一些额外信息。,35/56,Computer Program-Program Function,In either case, calls to other system routines are used to actually carry out the display of the results or the accessing of the file from the disk.,两种情况无论是哪一种,都要调用其他系统程序,以事实上完成结果的显示或对盘上文件的访问。,36/56,Computer Program-Program Function,When the application reaches completion or is prompted to quit, it makes further system calls to make sure that all data that needs to be saved has been written back to disk. It then makes a final system call to the operating system indicating that it is finished.,运行结束或接到退出的提示时,应用程序进行进一步的系统调用,以确保所有需要保存的数据已写回磁盘然后,应用程序向操作系统进行最后一次系统调用,指明它已运行结束。,37/56,Computer Program-Program Function,The operating system then frees up the RAM and any devices that the application was using and awaits a command from the user to start another program.,操作系统接下来释放随机存储器和该应用程序使用的任何设备,并等待用户的命令,以开始运行另一个程序。,38/56,Computer Program-History,People have been storing sequences of instructions in the form of a program for several centuries. Music boxes of the 18th century and player pianos of the late 19th and early 20th centuries played musical programs stored as series of metal pins, or holes in paper, with each line (of pins or holes) representing when a note was to be played, and the pin or hole indicating what note was to be played at that time.,很多个世纪以来,人们通过程序的形式来存储一系列的指令。18世纪的音乐盒和19世纪末与20世纪初的自动钢琴,就可以播放音乐程序。这些程序以一系列金属针或纸孔的形式存储,每一行(针或孔)表示何时演奏一个音符,而针或孔则表明此时演奏什么音符。,39/56,Computer Program-History,More elaborate control of physical devices became common in the early 1800s with French inventor Joseph Marie Jacquards invention of the punch-card controlled weaving loom. In the process of weaving a particular pattern, various parts of th

    注意事项

    本文(计算机专业英语Unit04 Programming and Simulation课件.ppt)为本站会员(小飞机)主动上传,三一办公仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三一办公(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    备案号:宁ICP备20000045号-2

    经营许可证:宁B2-20210002

    宁公网安备 64010402000987号

    三一办公
    收起
    展开