Unit4-Software-Development.ppt_第1页
Unit4-Software-Development.ppt_第2页
Unit4-Software-Development.ppt_第3页
Unit4-Software-Development.ppt_第4页
Unit4-Software-Development.ppt_第5页
免费预览已结束,剩余76页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Section A Computer Program 课文A 计算机程序,Unit 4 Software Development第4单元 软件开发,刘晓璐 讲师,. Introduction A computer program is a set of instructions that directs a computer to perform some processing function or combination of functions. combination,kmbnenn.结合;联合体; 计算机程序是指挥计算机执行某种处理功能或功能组合的一个指令集。,定语从句,For th

2、e instructions to be carried out, a computer must execute a program, that is, the computer reads a program, and then follows the steps encoded in the program in a precise order until completion. carry out执行;进行;完成 encodenkd vt.(将文字材料)译成密码;编码,编制成计算机语言 要使程序中的指令得到执行,计算机必须执行该程序,也就是说,计算机要读取该程序,然后按确切的顺序执行程

3、序中编码的步骤,直至程序结束。,A program can be executed many different times, with each execution yielding a potentially different result depending upon the operations and data that the user gives the computer. yieldji:ldvt.屈服;生产;获利;不再反对 potentiallyptenladv.潜在地;可能地;,一个程序可被多次执行,每次执行可能产生不同的结果,这取决于用户提供给计算机的操作和数据。,现在

4、分词短语作定语,定语从句,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. fall into分成; 陷入; 堕入 程序分为两大类:应用程序和操作系统。应用程序直接为用户执行某种功能,如处理文字或玩游戏。,An operating syst

5、em 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.,操作系统管理计算机以及与之相连的各种资源和设备,如随机存储器、硬盘驱动器、监视器、键盘、打印机和调制解调器,以便其他程序可以使用它们。

6、,定语从句,过去分词短语作定语,. Program Development (程序开发) Software designers create new programs by using special applications, often called utility programs or development programs. utility ju:tilitin.实用程序,公用程序 utility program实用程序,公用程序,软件设计者使用专门的应用程序来创建新程序,这种专门程序通常被称为实用程序或开发程序。,A programmer uses another type of

7、 program called a text editor to write the new program in a special notation called a programming language. text editor文本编辑程序,文本编辑器 notationnten n.记号,符号,标记法 程序员还使用另一种称为文本编辑器的程序来编写新程序,新程序是用称为程序设计语言的特殊符号来编写的。,With the text editor, the programmer creates a text file, which is an ordered list of instruc

8、tions, also called the program source file. The individual instructions that make up the program source file are called source code. source file源文件 make up组成,构成;编造,虚构,使用文本编辑器,程序员可创建一个文本文件,这个文本文件是一个指令的有序表,也称为程序源文件。构成程序源文件的各个指令称为源代码。,定语从句,At this point, a special applications program translates the so

9、urce code into machine language, or object codea format that the operating system will recognize as a proper program and be able to execute. object code目标代码 formatf:mt n. 版式;格式;形式 在这个时候,一种专门的应用程序将源代码翻译成机器语言或目标代码这是一种操作系统将视其为适合程序并能够执行之的格式。,Three types of applications programs translate from source cod

10、e to object code: compilers, interpreters, and assemblers. compiler kmpal(r)n.编译程序 interpreternt:prt(r)n.解释程序 assemblersembl(r)n. 汇编程序,有3种应用程序可将源代码翻译成目标代码:编译程序、解释程序和汇编程序。,The three operate differently and on different types of programming languages, but they serve the same purpose of translating fro

11、m a programming language into machine language. 这3种应用程序有不同的操作方式,并且对不同类型的编程语言进行操作,但是,它们都要达到将编程语言翻译成机器语言的相同目的。,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.,编译程序将用高级编程语言(如FORTRAN、C和Pascal等)

12、编写的文本文件一次性地从源代码翻译成目标代码。,过去分词短语作定语,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. differ from与不同,不同于 interpreted language解释执行的语言 这不同于BASIC等解释执行语言所采取的方式。在解释执行的语言中,程序是

13、随着每条指令的执行而逐个语句地翻译成目标代码的。,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.,解释执

14、行语言的优点是,它们可以立即开始执行程序,而不需要等到所有的源代码都得到编译。对程序的更改也可以相当快地进行,无需等到程序重新编译完。,表语从句,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. 解释执行的语言的缺点是,它们执行起来慢,因为每次运行程序,都必须对整个程序一次一条指令地翻译。,表语

15、从句,since引导的原因状语从句,each time引导的时间状语从句,On the other hand, compiled languages are compiled only once and thus can be executed by the computer much more quickly than interpreted languages. compiled language编译执行的语言,另一方面,编译执行的语言只编译一次,因此计算机执行起来比解释执行的语言快得多。,For this reason, compiled languages are more commo

16、n and are almost always used in professional and scientific applications. be used in被用于 由于这个原因,编译执行的语言比解释执行的语言常用,而且,在专业和科学领域几乎总是应用编译执行的语言。,Another type of translator is the assembler, which is used for programs or parts of programs written in assembly language. Assembly language is another programmi

17、ng language, but it is much more similar to machine language than other types of high-level languages .,另一种翻译程序是汇编程序,它用于翻译以汇编语言编写的程序或程序的组成部分。汇编语言是另一种编程语言,它比其他类型的高级语言更类似于机器语言。,In assembly language, a single statement can usually be translated into a single instruction of machine language. Today, asse

18、mbly 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. 在汇编语言中,一个语句通常可以翻译成机器语言的一条指令。今天,汇编语言很少用来编写整个程序,但是常用于程序员需要直接控制计算机某方面功能的情况。,Programs are often written as a set of smaller pieces,

19、 with each piece representing some aspect of the overall application program. After each piece has been compiled separately, program called a linker combines all of the translated pieces into a single executable program. piece程序块,程序经常被编写为一组较小的程序块,每块表示整个应用程序的某个方面。每块被独立编译之后,一种称为链接程序的程序将所有翻译好的程序块组合成一个可

20、执行的程序。,after引导的时间状语从句,Programs seldom work correctly the first time, so a program called a debugger is often used to help find problems called bugs. debug,di:bvt.拆除窃听器;排除故障;调试 debugger,di:bg(r)n. 调试工具;调试器; bugbn.故障;(程序)错误,程序很少能够第一次就正确运行,所以一种称为调试程序的程序常被用来帮助查找称为程序错误的问题。,Debugging programs usually dete

21、ct an event in the executing program and point the programmer back to the origin of the event in the program code. originrdnn.起源,根源;原点,起点; 调试程序通常在运行的程序中检测到一个事件,并将程序员指引到该事件在程序代码中的起点。,Recent programming systems, such as Java, use a combination of approaches to create and execute programs. A compiler t

22、akes a Java source program and translates it into intermediate form. source program源程序,Java等最近出现的编程系统,采取多种方法相结合的方式来创建和执行程序。一个编译程序先取得一个Java源程序,并将其翻译成中间形式。,Such intermediate programs are then transferred over the Internet into computers where an interpreter program then executes the intermediate form

23、as an application program. interpreter program解释程序 这样的中间程序随后通过因特网传送到别的计算机,那个机上的解释程序接着将这个中间形式作为应用程序来执行。,定语从句,contextkntekstn.上下文;背景;环境;语境 多数程序仅由少数几种步骤构成,这些步骤可在一个程序的不同上下文和以不同组合方式多次重复。,. Program Elements (程序元素) Most programs are built from just a few kinds of steps that are repeated many times in diffe

24、rent 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 the programmer. proceedprsi:dvi.进行;前进;继续进行 最常见的步骤执行某种计算,然后按程序员指定的顺序,进入程序的下一个步骤。,过去分词短语作定语,Programs often

25、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 repeative sequence of code are called loops.,looplu:pn.圈,环;回路;循环 程序经常需要多次重复不长的一系列步骤,例如:遍历游戏得分表并从中找出最高得分的程序。这种重复的代码序列称为循环。,One of the capabilities that make com

26、puters so useful is their ability to make conditional decisions and perform different instructions based on the values of data being processed. decisiondsnn.决定; 果断; 判定; 判决 based on以为依据,根据;基于;立足于;,使计算机如此有用的能力之一是它们能够作出条件判定,并根据正在处理的条件数据值执行不同的指令。,定语从句,If-then-else statements implement this function by t

27、esting some piece of data and then selecting one of two sequence of instructions on the basis of the result. If-then-else(如果-则-否则)语句可实现这种功能,采用的方法是测试某个数据片,然后根据测试结果从两个指令序列中选择一个。,One of the instructions in these alternatives may be a goto statement that direct computer to select its next instruction fr

28、om a different part of the program. alternative:lt:ntv n.二中择一; 可供选择的事物;,这些可选择指令序列中的指令之一可能是一个goto语句,用以指引计算机从程序的不同部分选择下一个指令。,定语从句,For example, a program might compare two numbers and branch to a different part of the program depending on the result of the comparison. If x is greater than y then goto i

29、nstruction #10 else continue 例如,一个程序可能比较两个数,并根据比较结果转移到程序的不同部分:,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. subroutinesbru:t

30、i:n n.子程序,程序经常多次使用某个特定的步骤系列。这样的步骤系列可以组织成一个子程序,而子程序可根据需要在主程序的不同部分进行调用或访问。,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. upon在上面; 当时候 每次调用一个子程序,计算机都会记住该调用发生在程序的哪个地方,以便在运行完这个子程序

31、后还能够回到那里。,时间状语从句,宾语从句,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. precedeprsi:d vt.常规;例行程序;日常library routine库程序;库存(子)程序;system routine系统例(行)程(序) 大多数程序使用几种不同的子例程。其中最常用的是函数

32、、过程、库、系统例程以及设备驱动程序。,Functions are short subroutines that compute some value, such as computations of angles, which the computer cannot compute with single basic instruction. Procedures perform a more complex function, such as sorting a set of names. sorts:t vt.挑选; 把分类; 将排顺序 函数是一种短的子程序,用来计算某个值,如角的计算,

33、而计算机仅用一条基本指令无法计算该值。过程执行的是比较复杂的功能,如给一组名字排序。,定语从句,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. They provide some service for the application programs, such as printi

34、ng 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. Device drivers often have features

35、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 qu

36、ality after changing an ink cartridge. realign,ri:lan v.重新排列,重新调整,再结盟 attainten v.达到,实现; 获得; 到达 ink cartridge墨盒 这使用户可以直接控制设备,这一点很有用,例如在彩色打印机更换墨盒后需要重新调整以达到最佳打印质量。,. Program Function (程序功能) Modern computers usually store programs on some form of magnetic storage media that can be accessed randomly by

37、the computer, such as the hard drive disk permanently located in the computer, or a portable floppy disk. portablep:tbladj.手提的; 轻便的,现代计算机通常将程序存储在计算机可以随机访问的某种形式的磁性存储介质上,如固定放在计算机内的硬盘或者便携式软盘。,定语从句,Additional information on such disks, called directories, indicates the names of various programs on the d

38、isk, when they were written to the disk, and where the program begins on the disk media. directorydrektrin.目录 这些磁盘上称为目录的额外信息,可指明盘上各种程序的名称、它们写入盘中的时间以及它们在磁盘介质上的起始位置。,When a user directs the computer to execute a particular application program, the operating system looks through these directories, loca

39、tes 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.,当用户命令计算机执行一个特定应用程序时,操作系统就浏览这些目录,找到该程序,并将一个副本读入随机存储器。操作系统然后命令中央处理器开始执行程序开头的指令。,Instructions at the beginning of the prog

40、ram prepare the computer to process information by locating free memory location in RAM to hold working data, retrieving copies of the standard options and default the user has indicated from a disk, and drawing initial displays on the monitor. memory location存储单元 程序开头的指令为计算机处理信息作好准备,其方法是在随机存储器中找到空闲

41、存储单元来容纳工作数据,从盘中检索用户指出的标准选项和默认值的副本,并在监视器上绘制初始显示。,定语从句(省略that),The application program requests a copy of any information the user enters by making a call to a system routine. The operating system converts any data so entered into a standard internal form.,应用程序通过调用系统例程对用户输入的任何信息都要求一个副本。操作系统将如此输入的任何数据都

42、转换成标准的内部形式。,定语从句(省略that),作定语修饰any data,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. desiredza(r)vt.希望; 渴望; 要求; 请求 应用程序

43、然后使用该信息决定下一步干什么,如执行某项期望的处理功能像重新格式化一页文本或从盘上的另一个文件获取一些额外信息。,In either case, calls to other system routines are used to actually carry out the display of results or the accessing of the file from the disk. 两种情况都要调用其他系统例程,来实现结果的显示或对盘上文件的访问。,When the application reaches completion or is prompted to quit,

44、 it makes further system calls to make sure that all data needs to be saved has been written back to disk. promptprmptv.提示,提醒,当应用程序运行结束或接到退出的提示时,应用程序作进一步的系统调用,以确保所有需要保存的数据已写回磁盘。,定语从句(省略that),宾语从句,It then makes a final system call to the operating system indicating that it is finished. The operating

45、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. 然后,应用程序向操作系统作最后一次系统调用,指明它已运行结束。操作系统接下来释放随机存储器和该应用程序使用的任何设备,并等待用户的命令,以开始运行另一个程序。,宾语从句,. History (历史) People have been storing sequences of instructions in the form

46、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, w

47、ith 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世纪初的自动钢琴,就可以播放音乐程序,这些程序以一系列金属针或纸孔的形式存储,每一行(针或孔)表示何时演奏一个音符,而针或孔则表明此时演奏什么音符。,过去分词短语作定语,More elaborate control of physical devices became

48、common in the early 1800s with French inventor Joseph-Marie Jacquards invention of the punch-card controlled weaving loom. elaborateilbrit adj.复杂的; 精心制作的; (结构)复杂的; 精巧的punch-card穿孔卡片,19世纪初,随着法国发明家约瑟夫玛丽雅卡尔发明了由穿孔卡片控制的织布机,对物理设备更精巧的控制变得常见了。,In the process of weaving a particular pattern, various parts of

49、 the loom had to be mechanically positioned. To automate this process, Jacquard used a single paper card to represent each positioning of the loom, with holes in the card to indicate which loom actions should be done. 在编织特定图案的过程中,织布机的各个部分必须进行机械定位。为了使这个过程自动化,雅卡尔使用一张纸质卡片代表织机的每一个定位,用卡片上的孔来指示应该执行织机的哪种操作

50、。,An entire tapestry could be encoded onto a deck of such cards, with same deck yielding the same tapestry design each time it was used. Programs of over 24000 cards were developed and used. tapestrytpistrin.花毯,毛毯 整条花毯的编织可编码到一叠这样的卡片上,同样的一叠卡片每次使用都会编出相同的花毯图案。由24,000多张卡片构成的程序曾被开发和使用过。,时间状语从句,The worlds

51、 first programmable machine was designed although never fully built by the English mathematician and inventor, Charles Babbage. 世界上第一台可编程的机器是由英国数学家和发明家查尔斯巴比奇设计的,但他从未完全制造成机器。,This machine, called the Analytical Engine, used punch cards similar to those used in the Jacquard loom to select the specific

52、 arithmetic operation to apply at each step. Inserting a different set of cards changed the computations the machine performed. arithmeticrmtk n.算术 这台机器叫做分析机,使用类似于雅卡尔织机的穿孔卡片,来选择每个步骤应该执行的具体算术运算。插入不同的卡片组,就会改变机器执行的运算。,This machine had counterparts for almost everything found in modern computers, althou

53、gh it was mechanical rather than electrical. Construction of the Analytical Engine was never completed because the technology required to build it did not exist at the time. counterpartkantp:tn.对应的物(或人) 这种机器几乎具有现代计算机中一切部件的相应部件,但它是机械式的,而非电气化的。分析机的制造从未完成,因为制造它所需要的技术当时不存在。,过去分词作定语,The first card deck p

54、rograms for the Analytical Engine were developed by British mathematician Augusta Ada Byron, daughter of the poet Lord Byron. For this reason she is recognized as the worlds first programmer. 供分析机使用的最早卡片组式程序是由诗人拜伦勋爵的女儿、英国数学家奥古斯塔埃达拜伦开发的。由于这个原因,她被公认为世界上第一位程序员。,The modern concept of an internally store

55、d computer program was first proposed by Hungarian-American mathematician John von Neumann in 1945. Von Neumanns idea was to use the computers memory to store the program as well as the data. as well as既又;也,又 现代内部存储计算机程序的概念是由美籍匈牙利数学家约翰冯诺伊曼于1945年首先提出来的。冯诺伊曼的想法是,使用计算机的存储器既存储数据又存储程序。,In this way, progr

56、ams can be viewed as data and can be processed like data by other programs. This idea greatly simplifies the role of program storage and execution in computers. rolerln.作用; 地位; 角色 这样,程序可被视为数据,可像数据一样被其他程序处理。这一想法极大地简化了在计算机中存储与执行程序的任务。,QUESTION,Where the sequences of instructions in a loom stored in th

57、e early 1800s? Punch-card Who is the first person that proposed the idea of using computer memory to store the program as well as the data? John Von Neumann,VI. The Future (未来),The field of computer science has grown rapidly since the 1950s due to the increase in their use. Computer programs have un

58、dergone many changes during this time in response to user need and advances in technology. in response to对做出反应(响应,回应) 由于计算机使用的增加,自20世纪50年代以来,计算机科学领域发展迅猛。作为对用户需求和技术进步的响应,计算机程序在这一时期经历了许多变化。,Newer ideas in computing such as parallel processing, distributed computing, and artificial intelligence, have r

59、adically altered the traditional concepts that once determined program form and function. distributedstrbju:tvt.分配,散布,分发,分布 计算领域的新思想,如并行计算、分布式计算和人工智能,从根本上改变了一度决定程序形式与功能的传统概念。,定语从句,Computer scientists working in the field of parallel computing, in which multiple CPUs cooperate on the same problem at the same time, have introduced a number of new program models. 致力于并行计算(即多个CPU同时协作解决同一个问题的计算)领域的计算机科学家们,推出了许多新的程序模型。,In parallel computing parts of a problem are worked on simultaneously by different processors, and this speeds

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论