Chapter 9: The Tower of BabelObjectivesWhy Babel?Procedural LanguagesFORTRANFORTRAN (continued)COBOLCOBOL (continued)Slide 9C/C++C/C++ (continued)Slide 12Slide 13AdaAda (continued)C# and .NETC# and .NET (continued)Slide 18Special-Purpose LanguagesSQLHTMLHTML (continued)Slide 23Slide 24Slide 25JavaScriptAlternative Programming ParadigmsAlternative Programming Paradigms (continued)Slide 29Functional ProgrammingFunctional Programming (continued)Slide 32Slide 33Logic ProgrammingLogic Programming (continued)Slide 36Slide 37Slide 38Slide 39Parallel ProgrammingParallel Programming (continued)Slide 42SummarySummary (continued)Chapter 9: The Tower of BabelInvitation to Computer Science,Java Version, Third EditionInvitation to Computer Science, Java Version, Third Edition2ObjectivesIn this chapter, you will learn aboutProcedural languagesSpecial-purpose languagesAlternative programming paradigmsInvitation to Computer Science, Java Version, Third Edition3Why Babel?Multiple programming languagesEach language designed for specific needsOne language may be better suited than others for writing certain kinds of programsInvitation to Computer Science, Java Version, Third Edition4Procedural LanguagesAlso called imperative languagesA program consists of sequences of statements that manipulate data itemsThe programmer devises the step-by-step sequence of “imperative commands”Invitation to Computer Science, Java Version, Third Edition5FORTRANFORTRAN derives from FORmula TRANslationDeveloped in the mid-1950s by a group at IBM headed by John BackusFirst high-level programming languageRemains an effective language for engineering applicationsInvitation to Computer Science, Java Version, Third Edition6FORTRAN (continued)Designed for numerical computationsAllows concise mathematical notation and a number of mathematical functionsAnother goal: Optimize the object codeExternal libraries of code modules that are separately compiled and used by a programInvitation to Computer Science, Java Version, Third Edition7COBOLCOBOL derives from COmmon Business-Oriented L anguageDeveloped in 1959-1960 by a group headed by Grace Hopper of the U.S. NavyDesigned to serve business needs such as managing inventories and payrollsBetter for file input than keyboard inputInvitation to Computer Science, Java Version, Third Edition8COBOL (continued)Much of a COBOL program may be concerned with formattingDescribed by “PICTURE clauses” in the programCOBOL programsMore verbose than other languagesHighly portableInvitation to Computer Science, Java Version, Third Edition9COBOL (continued)COBOL programsEasy to readWell-suited for manipulating large data filesStill the most widely used languageInvitation to Computer Science, Java Version, Third Edition10C/C++CDeveloped in the early 1970s by Dennis Ritchie at AT&T Bell LaboratoriesOriginally designed for systems programming (UNIX)Most widely used language for system software Also used for general-purpose computingInvitation to Computer Science, Java Version, Third Edition11C/C++ (continued)Why is C so popular?Relationship between C and UNIXC’s efficiencyC is close to assembly languageHas high-level statementsPortabilityInvitation to Computer Science, Java Version, Third Edition12Figure 9.1User Hardware Interface and Programming LanguagesInvitation to Computer Science, Java Version, Third Edition13C/C++ (continued)C++Developed in the early 1980s by Bjarne Stroustrup at AT&T Bell LaboratoriesA “superset” of CA popular “industrial-strength” language because of StandardizationObject-orientationA strong collection of library codeInvitation to Computer Science, Java Version, Third Edition14AdaMid-1970s: Branches of the U.S. armed services started to develop a common high-level programming language1979: Winner of design competitionAda 95 Reference ManualCurrent international standard existsInvitation to Computer Science, Java Version, Third Edition15Ada (continued)AdaProvides multiprocessing capabilityStrongly object-orientedStill used today inTransportation industrySafety monitoring systems at nuclear reactorsFinancial and communication systemsInvitation to Computer Science, Java Version, Third Edition16C# and .NETC#Introduced in June 2000Many improvements in safe usage over C++Shares many features with JavaInvitation to Computer Science, Java Version, Third Edition17C# and .NET (continued)Microsoft .NET FrameworkSupports C# and other languagesFacilitates ease of developmentTraditional text-based applicationsGUI applicationsWeb-based programsInvitation to Computer Science, Java Version, Third Edition18C# and .NET (continued).NET programs are highly portable.NET programs are compiled into Microsoft Intermediate Language (MSIL)MSIL is not tied to any particular platformJust In Time compiler or JITCompiles MSIL code into object code on the user’s machineInvitation to Computer Science, Java Version, Third Edition19Special-Purpose LanguagesDesigned for one specialized taskExamplesSQLHTMLJavaScriptInvitation to Computer Science, Java Version, Third Edition20SQLSQL: Structured Query LanguageA database stores dataDatabases can be queried: The user can pose questions to the databaseSQL is the language used to frame database queriesInvitation to Computer Science, Java Version, Third Edition21HTMLHTML: HyperText Markup LanguageHTML is the language used to create HTML documentsWeb pageAn HTML document viewed with Web browser softwareInvitation to Computer Science, Java Version, Third Edition22HTML (continued)An HTML documentConsists of text displayed on the Web page and tagsTags are special charactersFormattingSpecial effectsReferences to other HTML documentsInvitation to Computer Science, Java Version, Third Edition23Figure 9.4HTML Code for a Web PageInvitation to Computer Science, Java Version, Third Edition24Figure 9.5Body of the Web Page Generated by Figure 9.4Invitation to Computer Science, Java Version, Third Edition25Figure 9.6Some HTML TagsInvitation to Computer Science, Java Version, Third Edition26JavaScriptJavaScript is a scripting languageScripting languageA “lightweight” language that is Interpreted (translated/executed statement by statement)Code fragments can be embedded in
View Full Document