高等教育出版社影印版計算機專業(yè)英語習(xí)題ch_14_im_第1頁
高等教育出版社影印版計算機專業(yè)英語習(xí)題ch_14_im_第2頁
高等教育出版社影印版計算機專業(yè)英語習(xí)題ch_14_im_第3頁
高等教育出版社影印版計算機專業(yè)英語習(xí)題ch_14_im_第4頁
高等教育出版社影印版計算機專業(yè)英語習(xí)題ch_14_im_第5頁
已閱讀5頁,還剩26頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、Ch 14 Programming and LanguagesLecture OutlineCompetencies pg 386Describe the six steps of programming.Discuss design tools including top-down design, pseudocode, flowcharts, and logic structures.Describe program testing and the tools for finding and removing errors.Describe CASE tools and object-or

2、iented software development.Explain the five generations of programming languages.Introduction pg 387In systems analysis and design, we do some general problem solving.In programming, we do specific problem solving.You should know about programming for two key reasons:First, you may need to work wit

3、h programmers, so it helps to understand something about the process.Second, you may need to do some programming yourself, such as end user application development.Programming occurs during Phase 4: System Development of the system life cycleCompetent end users need to understand the relationship be

4、tween system development and programmingThey need to know the six steps of programming, including:Program specificationsProgram designProgram codeProgram testProgram documentation, andProgram maintenancePrograms and Programming pg 388Programming is a problem-solving procedure.What is a program?A pro

5、gram is a list of instructions for the computer to follow to accomplish the task of processing data into informationThe instructions are made up of statement used in programming languageSome programming languages include BASIC, C, and JavaSome programs include application programs like a word proces

6、sor or spreadsheetOthers include system programs like an operating systemCustom made programs might include something like a time-and-billing applicationWhat is programming?Programming is also known as software developmentIt is a six step procedure for creating that list of instructionsThe six steps

7、 include:Program specification the objectives, outputs, inputs, and processing requirements are determinedProgram design a solution is created using techniques such as top-down program design, pseudocode, flowcharts, and logic structuresProgram code the program is written or coded using a programmin

8、g languageProgram test the program is tested (debugged) by looking for syntax and logic errorsProgram documentation an ongoing process to formalize the written description and processes used in the programProgram maintenance completed programs are periodically reviewed to evaluate their accuracy, ef

9、ficiency, standardization, and ease of use. Changes are made to the programs code as needed.Software engineers (aka programmers) use these six steps to develop programsStep 1: Program Specification pg 389In the program specification step, the objectives, outputs, inputs, and processing requirements

10、are determined.The program specification is also called the program definition or program analysis.Program ObjectivesObjectives are the problems you are trying to solveYou need to make a clear statement of the problem you are trying to solve with this programDesired OutputIts best to start with the

11、outputs BEFORE you list the inputsOnce you have the output, then you do the input, and finally, the process to convert inputs to outputA sketch of a report is a good starting pointInput DataList the input data and the source of this dataA sketch of a form may be helpfulProcessing RequirementsList th

12、e steps to convert the input into the outputDocument the Program SpecificationsAll the documents created above need to be combined into one portfolio for future referenceMuch of this documentation is possible to do electronically using CASE tools, etc.Step 2: Program Design pg 391In the program desi

13、gn step, a solution is created using programming techniques such as top-down program design, pseudo code, flowcharts and logic structuresTop-Down Program DesignTop-down program design is used to identify the programs processing stepsThese steps are called program modules (or just modules)Each module

14、 is broken down into smaller sets of modules, until it has a single function, e.g. compute gross payThe program must pass in sequence from one module to the next until all have been processedThe three principle computer system operations include input, process, and outputPseudocodePseudocode (pronou

15、nced “soo-doh-code”) is an outline of the logic of the program you will writeIt may be done in place of a program flowchart, depending on the design standards the organization followsFlowchartsProgram flowcharts graphically present the detailed sequence of steps needed to solve a programming problem

16、Typical flowchart symbols include:Processing rectanglesInput/Output parallelogramsDecisions diamondsConnectors circlesTerminal (start or end point) - ovalLogic StructuresThree standard logic structures include sequence, selection, and loopA fourth structure, the case structure is often mentioned in

17、program design literature, but can be thought of as a special format of the selection structureSequence StructureOne program statement just follows the previousSelection StructureOne of two processing paths can be followed depending on a conditionFor example, the condition may test if an employee wo

18、rked any overtime hours if they did, you calculate the overtime pay, otherwise, you set overtime pay to zeroThis is known as an IF-THEN-ELSE structureLoop StructureDescribes a process that may be repeated as long as certain conditions remain trueThe structure is called a loop (or iteration) because

19、the program literally loops around and performs the same code over and over again until a condition changesIf for some reason the condition never changes, a program can get caught in an “infinite loop” which is a failure in the program (the program will “l(fā)ock up”)Two forms of a loop structure includ

20、eDO UNTIL condition tested at end of loop loop statements will be executed at least onceDO WHILE condition tested at beginning of loop loop statements may not be executed if condition is never trueStep 3: Program Code pg 396Writing a program is called coding.You use the logic you developed in the pr

21、ogram design step to actually write the program syntax.The Good ProgramGood programs should be reliable: they should work under most conditions. They should catch obvious and common input errors.It should be well documented and understandable by programmers other than the person who wrote it.They sh

22、ould be structured programs, using the logic structures described previouslyCodingFormatting or Presentation Languages use symbols, words, and phrases to instruct a computer as to how to display information to the user.HTML Hyper Text Markup Language is an example. HTML is used to code web pages.Pro

23、gramming languages use a collection of symbols, works and phrases to instruct a computer to perform specific operations.Programming languages focus on processing data for a wide variety of different types of applicationsExamples of programming languages include C, C+, C#, Java, JavaScript, and Visua

24、l BasicStep 4: Program Test pg 399Debugging is a programmers word for testing and then eliminating errors (“getting the bugs out”).Two types of programming errors include syntax errors and logic errorsSyntax ErrorsA syntax error is a violation of the rules of the programming language, for example, i

25、f you leave a semicolon (;) off the end of a C+ programming statement, it would result in a syntax errorLogic ErrorsA logic error occurs when a programmer uses an incorrect calculation or leaves out a programming procedure.An example of a logic error is a payroll program that did not compute overtim

26、e errorsTesting ProcessSeveral methods for finding and removing errors include:Desk checkingA programmer sitting at a desk checks (proofreads) a printout of the program. The programmer goes through the listing line by line looking for syntax and logic errorsManually testing with sample dataUsing a c

27、alculator and sample data, the programmer follows each program statement and performs every calculation. Looking for programming logic errors, the programmer compares the manually calculated values to the correct values.Attempt at translationThe program is run through a computer, using a translator

28、program. The translator program tries to convert the program from source code to machine language. Before the program can run, it must be free of syntax errors.Testing sample data on the computerAfter all syntax errors have been removed, a sample run is made to test for logic errorsTesting by a sele

29、ct group of potential usersSometimes called Beta testing, it is usually the final testing of a programStep 5: Documentation pg 400Documentation consists of written descriptions and procedures about a program and how to use it.Program documentation is carried on throughout all the programming stepsDo

30、cumentation can help the following people:Users - need to know how to use the softwareOperators need to know how to correct errorsProgrammers need to know how to modify programsStep 6: Program Maintenance pg 402As much as 75% of the total lifetime cost of a program is for maintenance.Maintenance pro

31、grammer are specialists that work on these types of projectsThe purpose of program maintenance is to ensure that the current programs are operating error free, efficiently, and effectively.Activities in this area fall into two categories, operations and changing needsOperationsOperations activities

32、concern locating and correcting operational errors, making programs easier to use, and standardizing software using structured programming techniquesFor properly designed programs, these activities should be minimalChanging NeedsChanging needs are unavoidableExamples for changes include new tax laws

33、, new information needs, new company policies, etc.CASE and OOP pg 403CASE tools automate the development process.CASE toolsProfessional programmers are constantly looking for ways to make their work easier, faster, and more reliable.Computer Aided Software Engineering (CASE) tools provide some auto

34、mation and assistance in program design, coding, and testing.Object-Oriented Software DevelopmentTraditional systems development is a careful, step by step approach focusing on the procedures needed to complete a certain objectiveObject-Oriented software development focuses less on the procedures an

35、d more on defining the relationships between previously defined procedures or “objects”O(jiān)bject-oriented programming (OOP) is a process by which a program is organized into objects.Each object contains both the data and processing operations necessary to perform a taskOO programs use modules called ob

36、jects that are reusable, self-contained components, e.g. a sort module that doesnt need to be recreated each time it is used.C+ is one of the most widely used object-oriented programming languagesGenerations of Programming Languages pg 404Levels or generations of programming languages range from low

37、 to highLower level languages are closer to the language the computer uses itself (machine code 1s and 0s)Higher level languages are closer to human languagesMachine Languages: the First GenerationData represented in machine language are written as a series of bits 1s and 0sThe computer runs program

38、s once they are translated into a series of bits like thisMachine code programs are very efficient, but obviously difficult to writeAssembly Languages: the Second GenerationAssembly languages use abbreviation or mnemonics such as ADD that are automatically converted to the appropriate sequence of 1s

39、 and 0sAssembly languages are much easier to use than machine language, but still more difficult to use than higher level languagesThese tend to be hardware dependent, but very efficientHigh-level Languages: the Third GenerationThese are considered portable languages because they are not tied specif

40、ically to certain hardware like machine and assembly languagesProcedural languages (aka 3GLs 3rd Generation Languages) are designed to express the logic procedures to solve general problemsCobol, Basic, and C+ are common 3rd generation languagesDepending on the language, the source code is translate

41、d into machine code using an interpreter or a compilerOnce compiled, the program code can be stored as the object code, which is then saved to be run over and over (without going through the compile process each time). Pascal, Cobol, and Fortran use compilers.An interpreter does a similar process, o

42、nly the translated code is not saved each time the program is run, it is interpreted into machine code and run again. The Basic programming language uses an interpreter.Problem-oriented Languages: the Fourth GenerationProblem-oriented languages (aka 4GLs 4th generation languages) are very high level

43、 languages designed to make it easy for people to write programsThese are designed to tackle specific problems, such as financial or statistical analysisIFPS (Interactive Financial Planning System) is used to create financial modelsMany 4GLs are part of DBMS systems, including:Query LanguagesQuery l

44、anguages enable non-programmers to use certain easily understood commands to search and generate reports from a databaseStructured Query Language (SQL) is one of the most widely used query languagesApplication GeneratorsAn application generator (aka program coder) is a program that provides modules

45、of prewritten code.Programmers can quickly create a program by referencing the appropriate modulesMS Access has a report generation application and a Report Wizard for quickly creating reportsNatural Languages and Visual Programming: the Fifth GenerationA 5th GL is a computer language that incorpora

46、tes the concepts of artificial intelligence to allow direct human communication.These languages would enable a computer to learn and to apply new information as people do.Visual programming languages are also included in 5GLs, such as Microsofts Visual BasicUsing IT At DVD Direct A Case Study pg 408

47、Programming and LanguagesThis section briefly describes DVD Direct, a fictitious organization, to demonstrate how programs are developed by a business.In the case, and application has been written to allow users to log in and download movies from the net.Use the Computing Essentials CD to follow thi

48、s caseA Look to the Future pg 409MI-tech Takes the Pain Out of ProgrammingSynapse Solution is a firm that has developed a product that allows you to easily write programs that run on Windows PCs, Macs, or Linux boxes.The product, MI-tech, understands word order and meaning in English. You enter a “w

49、ish list” and the computer translates these sentences into machine language.This product is an example of the types of technologies that come closer to creating a true “fifth generation programming language”.Try accessing http:/w for more informationVisual Summary at a glance Programming and Languag

50、es pg 410Step 1: Program SpecificationProgram objectivesDesired outputInput dataProcessing requirementsProgram specifications documentStep 2: Program DesignTop-down designPseudocodeFlowchartsLogic StructuresStep 3: Program CodeGood programsCodingFormatting languagesProgramming languagesStep 4: Progr

51、am TestSyntax errorsLogic errorsTesting processStep 5: Program DocumentationFor usersFor operatorsFor programmersStep 6: Program MaintenanceOperationsChanging NeedsCASE and OOPCASEOOPProgramming GenerationsFirst: machineSecond: assemblyThird: proceduralFourth: problemFifth: natural and visualKey Ter

52、ms pg 4131application generator 406software that can speed up the process of writing programs since it pulls in common modules, etc2assembly language405low level programming language used to write efficient programs - typically used for system software authoring3beta testing 400having a group of key

53、 users try out a program before the final version is released4code 396computer instructions in a program, or the process for writing them5Coding396the process of writing the actual syntax of a computer program6Compiler405translates computer source code into machine code and stores it in an object fi

54、le for later execution7computer-aided software engineering toolsCASE403special software programs used to speed up the design and development of computer programs8Debugging399process of finding and eliminating errors from computer programs9desk checking399manually checking each line of code for synta

55、x errors11DO UNTIL structure394loop structure with the test after the code is executed at least one time12DO WHILE structure394loop structure with the test before the code is done the first time10Documentation400written plans, diagrams, explanations, etc. for a computer system, e.g. user, operator,

56、and program manuals13fifth generation language5GL407highest level of computer languages, includes both natural and visual languages14formatting language396computer language that controls the context and format for information, e.g. HTML15fourth generation language4GL406high level language designed t

57、o be easy to program, e.g. SQL or other special application programming environments16Generation404a level of a computer programming language - low are close to machine code, high are close to human language17higher level404programming languages that are closer to human language than they are to mac

58、hine language19IF-THEN-ELSE structure393common decision structure in which a program can execute two different paths depending on a condition18interactive financial planning systemIFPS406software product used by organizations for creating financial models20Interpreter406translates computer source co

59、de into machine code and executes it at the same time21Level404a generation of programming language, lower close to machine code, higher to human language22logic error399mistake in a computer program in which the processing step does not accomplish what needs to be done23logic structure393order of c

60、omputer program statements, including sequence, selection, and loops24loop structure393logical programming structure in which you can repeat code over and over until a condition is reached25lower level404programming language that is close to the machine code that the computer actually runs26machine

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論