Computers Are Your FutureSlide 2What You Will Learn AboutSlide 4Programming LanguagesDevelopment of Programming LanguagesFirst-Generation LanguagesSecond-Generation LanguagesThird-Generation LanguagesThird-Generation Languages (continued)Slide 12Slide 13Fourth-Generation LanguagesObject-Oriented ProgrammingObjectsCommon Business-Oriented Language (COBOL)Formula Translator (Fortran)AdaBeginner’s All-Purpose Symbolic Instruction Code (BASIC)Visual Basic (VB)PascalCSmalltalkC++JavaSlide 27Sample Java ProgramWeb-Based LanguagesThe Program Development Life Cycle (PDLC)Phase 1: Defining the ProblemPhase 2: Designing the ProgramPhase 3: Coding the ProgramPhase 4: Testing and Debugging the ProgramPhase 5: Formalizing the SolutionPhase 6: Implementing and Maintaining the ProgramChapter 11 SummaryChapter 11 Summary, continuedComputers Are Your Future© 2006 Prentice Hall, Inc.© 2006 Prentice Hall, Inc. Slide 2Computers Are Your Future: Chapter 11Computers Are Your FutureChapter 11Programming Languages and Program Development© 2006 Prentice Hall, Inc. Slide 3Computers Are Your Future: Chapter 11What You Will Learn AboutWhat a programming language isMachine language and assembly languageHigh-level programming languages The shortcomings of early languagesPopular programming languages© 2006 Prentice Hall, Inc. Slide 4Computers Are Your Future: Chapter 11What You Will Learn AboutThe six phases of the program development life cycle (PDLC) Why top-down programming makes programs easier to debug and maintainThe three basic types of control structuresSyntax errors and logic errors in programs© 2006 Prentice Hall, Inc. Slide 5Computers Are Your Future: Chapter 11Machine LanguageAdaPascalFortranCOBOLAssembly LanguageSmalltalkVisual BasicBASICJavaC and C++Programming LanguagesProgramming languages are artificial languages created to tell the computer what to doThey consist of vocabulary and a set of rules to write programsThe program development life cycle (PDLC) is an organized method of software development© 2006 Prentice Hall, Inc. Slide 6Computers Are Your Future: Chapter 11Development of Programming LanguagesProgramming languages are classified by levels or generationsLower-level languages are the oldestThe five generations of programming languages are:Machine languagesAssembly languagesProcedural languagesProblem-oriented languagesNatural languages© 2006 Prentice Hall, Inc. Slide 7Computers Are Your Future: Chapter 11First-Generation LanguagesMachine language: Consists of binary numbers (0s and 1s)Is the earliest programming languageIs the only language the computer understands without translationIs machine dependentEach family of processors has its own machine language© 2006 Prentice Hall, Inc. Slide 8Computers Are Your Future: Chapter 11Second-Generation LanguagesAssembly language: Resembles machine language Is a low-level languageUses brief abbreviations for program instructions.Abbreviations are called mnemonicsA program is written in source code (text file) and translated into machine language by an assembler© 2006 Prentice Hall, Inc. Slide 9Computers Are Your Future: Chapter 11Third-Generation LanguagesProcedural languages: Are high-level languages that tell the computer what to do and how to do itCreate programs at a high level of abstractionAre easier to read, write, and maintain than machine and assembly languagesUse a compiler or interpreter to translate codeFortran and COBOL are third-generation languages© 2006 Prentice Hall, Inc. Slide 11Computers Are Your Future: Chapter 11Third-Generation Languages (continued)Spaghetti Code and the Great Software Crisis:GOTO statements resulted in programs that were difficult to followThis problem led to the software crisis of the 1960sPrograms were not ready on timePrograms exceeded their budgetsPrograms contained too many errorsCustomers were not satisfied© 2006 Prentice Hall, Inc. Slide 12Computers Are Your Future: Chapter 11Third-Generation Languages (continued)Structured programming languages:Were developed to improve software developmentInclude Algol and PascalForbid the use of GOTO statementsUse control structures IF-THEN-ELSE© 2006 Prentice Hall, Inc. Slide 13Computers Are Your Future: Chapter 11Third-Generation Languages (continued)Modular programming languages:Were developed because of problems in structured programming languagesAre used to create programs that are divided into separate modulesEach module carries out a special functionRequire specified input to produce specified output© 2006 Prentice Hall, Inc. Slide 14Computers Are Your Future: Chapter 11Fourth-Generation LanguagesTypes of fourth-generation languages include:Report generators Languages for printing database reportsQuery languagesLanguages for getting information out of databasesFourth-generation languages are nonproceduralThey do not force programmers to follow procedures to produce results© 2006 Prentice Hall, Inc. Slide 15Computers Are Your Future: Chapter 11Object-Oriented ProgrammingObject-oriented programming (OOP): Relies on component reusabilityThe ability to produce program modules that perform a specific taskEliminates the distinction between programs and dataUses objects that contain data and procedures© 2006 Prentice Hall, Inc. Slide 16Computers Are Your Future: Chapter 11ObjectsObjects are units of information that contain data as well as methods that process and manipulate the data Classes of objects:Hierarchy or category of objectsObjects at the top of the category are broader in scope than the subclass objectsInheritance refers to an object’s capacity to “pass on” its characteristics to its subclasses© 2006 Prentice Hall, Inc. Slide 17Computers Are Your Future: Chapter 11Sample Cobol programCommon Business-Oriented Language (COBOL)COBOL:The earliest (1959) high-level languageThe most widely used business languageA proven way to do accounting, inventory, billing, and payrollRequires programmers to explain what the program is doing at each step© 2006 Prentice Hall, Inc. Slide 18Computers Are Your Future: Chapter 11Sample Fortran programFormula Translator (Fortran)Fortran: Began in the 1950sIs suited to scientific, mathematical, and engineering applicationsIs used to solve complex
View Full Document