Invitation to Computer Science 5th Edition

Slides:



Advertisements
Similar presentations
EC-111 Algorithms & Computing Lecture #1 Instructor: Jahan Zeb Department of Computer Engineering (DCE) College of E&ME NUST.
Advertisements

The Web Warrior Guide to Web Design Technologies
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Computers: Tools for an Information Age
Tutorial 10 Programming with JavaScript
Chapter 9: The Tower of Babel Invitation to Computer Science, C++ Version, Fourth Edition Additions by S. Steinfadt for SP08.
Chapter 9: The Tower of Babel Invitation to Computer Science, Java Version, Third Edition.
Chapter 9: The Tower of Babel Invitation to Computer Science, C++ Version, Fourth Edition Editied / additions by S. Steinfadt for SP09.
Chapter 9: The Tower of Babel
Chapter 8 The Tower of Babel. Chapter Outline Procedural languages Fortran, COBOL, PASCAL, C, Ada Object-oriented programming Special-purpose languages.
Alternative Programming Paradigms
Modules, Hierarchy Charts, and Documentation
© Prentice Hall CHAPTER 3 Computer Software.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Guide To UNIX Using Linux Third Edition
Chapter 3 Software Two major types of software
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Building Applications.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
CS102 Introduction to Computer Programming
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Programming languages Zuzana Brťková. What is programming language? A programming language is an artificial language designed to communicate instructions.
INTRODUCTION TO WEB DATABASE PROGRAMMING
 2008 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
Chapter 8 High-Level Programming Languages (modified by Erin Chambers)
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
Chapter 9: The Tower of Babel Invitation to Computer Science, C++ Version, Third Edition.
16-1 The World Wide Web The Web An infrastructure of distributed information combined with software that uses networks as a vehicle to exchange that information.
CPS120: Introduction to Computer Science The World Wide Web Nell Dale John Lewis.
4 - 1 Copyright © 2006, The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
1.8History of Java Java –Based on C and C++ –Originally developed in early 1991 for intelligent consumer electronic devices Market did not develop, project.
Machine Languages It is the only language the computer understands. It is made of 0s and 1s. They must be in 0s and 1s because the internal circuit of.
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 2: What is JavaScript?
Tutorial 10 Programming with JavaScript. XP Objectives Learn the history of JavaScript Create a script element Understand basic JavaScript syntax Write.
Tutorial 10 Programming with JavaScript
Done by: Hanadi Muhsen1 Tutorial 1.  Learn the history of JavaScript  Create a script element  Write text to a Web page with JavaScript  Understand.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
Discovering Computers 2009 Chapter 13 Programming Languages and Program Development.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Chapter 9: The Tower of Babel 國立雲林科技大學 資訊工程研究所 張傳育 (Chuan-Yu Chang ) 博士 Office: ES 709 TEL: ext 國立雲林科技大學.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
JavaScript Defined JavaScript Basics Definitions JavaScript is an object-oriented programming language designed for the world wide web. JavaScript code.
Agenda Computer Languages How to Write a Simple C Program
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Introduction to OOP CPS235: Introduction.
Course Instructor: Hira Farman Course : BY:HIRA FARMAN.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
Invitation to Computer Science, Java Version, Second Edition 1 Logic Programming Logic programming  Various facts are asserted to be true  On the basis.
Invitation to Computer Science 6 th Edition Chapter 10 The Tower of Babel.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
Software Design and Development Languages and Environments Computing Science.
JavaScript and AJAX 2nd Edition Tutorial 1 Programming with JavaScript.
Microsoft Visual Basic 2015 CHAPTER ONE Introduction to Visual Basic 2015 Programming.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
Chapter 8 The Tower of Babel. Procedural Languages – Figure 8.1 User-Hardware Interface and Programming Languages (a) A High-Level Language Shields the.
Tutorial 10 Programming with JavaScript
CSCI-235 Micro-Computer Applications
Introduction to Visual Basic 2008 Programming
Chapter 10 The Tower of Babel.
Tutorial 10 Programming with JavaScript
Introduction to Computer Programming
Tutorial 10: Programming with javascript
Presentation transcript:

Invitation to Computer Science 5th Edition Chapter 10 The Tower of Babel

Objectives In this chapter, you will learn about: The reason for the proliferation of programming languages (Why Babel?) Procedural languages Special-purpose languages Alternative programming paradigms Invitation to Computer Science, 5th Edition

Why Babel? Reasons for the proliferation of programming languages Proliferation of programming tasks Different philosophies have developed about how people should think when they are writing programs Invitation to Computer Science, 5th Edition 3

Procedural Languages Procedural language programs Tell the computer in a step-by-step fashion how to manipulate the contents of memory locations Invitation to Computer Science, 5th Edition 4

Plankalkül Programming language designed by Konrad Zus Never widely used Manuscript describing this programming language Completed in 1945, but not published until 1972 Invitation to Computer Science, 5th Edition

FORTRAN Name derives from FORmula TRANslation First high-level programming language Designed to support numerical computations Allows external libraries of well-written, efficient, and thoroughly tested code modules Invitation to Computer Science, 5th Edition

COBOL Name derives from COmmon Business-Oriented Language Developed in 1959 and 1960 By group headed by Grace Hopper of the U.S. Navy Designed to serve business needs such as managing inventories and payrolls Programs use natural language phrases Invitation to Computer Science, 5th Edition

COBOL (continued) COBOL programs Highly portable across many different COBOL compilers Quite easy to read Very well-suited to manipulating large data files Invitation to Computer Science, 5th Edition

C / C++ C Reasons for popularity Developed in early 1970s by Dennis Ritchie at AT&T Labs Originally designed for systems programming, in particular for writing the operating system UNIX Reasons for popularity Close relationship between C and UNIX Efficiency Invitation to Computer Science, 5th Edition

Figure 10.1 User Hardware Interface and Programming Languages Invitation to Computer Science, 5th Edition

Figure 10.2 C Allows Access to a Memory Cell Address as well as to its Content Invitation to Computer Science, 5th Edition

C / C++ (continued) C includes a data type called pointer Variables of pointer type Contain memory addresses Device driver Program that interacts with an I/O device C is the most widely used language for writing system software Invitation to Computer Science, 5th Edition

C / C++ (continued) C++ Developed in the early 1980s by Bjarne Stroustrup, at AT&T Labs Provides ability to do object-oriented programming Commercially released by AT&T in 1985 Invitation to Computer Science, 5th Edition

Figure 10.3 Storing a Value in a Specific Memory Location Using C Invitation to Computer Science, 5th Edition

Ada Named after Ada Augusta Byron Lovelace, daughter of the poet Lord Byron and wife of Lord Lovelace Current Ada 2005 standard Amended version of the Ada 95 standard Accepted in: The defense industry Other technological applications As a general-purpose language Invitation to Computer Science, 5th Edition

Java Applications Applets Bytecode Standalone programs that reside and run on a self-contained computer Applets Programs designed to run from Web pages Embedded in Web pages on central servers Bytecode Can be easily translated into any specific machine language Invitation to Computer Science, 5th Edition

Python Originally created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum An interpreted language Originally used for system administration tasks and as a Web interface language Invitation to Computer Science, 5th Edition

C# and .NET Garbage collection Microsoft .NET Framework Reclaiming memory no longer needed by the program Microsoft .NET Framework Essentially a giant collection of tools for software development Handles garbage collection for a C# program All .NET programs are compiled into Microsoft Intermediate Language (MSIL) code Invitation to Computer Science, 5th Edition

C# and .NET (continued) Difference between the Java approach and the .NET approach Java bytecode translator is an interpreter More than 40 programming languages: Have been adapted to fit into the .NET Framework April 2003 C# and the CLI were adopted as ISO standards Invitation to Computer Science, 5th Edition

Special-Purpose Languages SQL (Structured Query Language) Designed to be used with databases Language used to frame database queries Developed by IBM Adopted by ANSI, in 1986, as the standard query language in the United States Databases Collections of related facts and information Can be queried Invitation to Computer Science, 5th Edition

HTML HTML document HTML tags Consists of the text to be displayed on the Web page, together with a number of special characters called tags HTML tags Enclosed in angle brackets (< >) and often come in pairs Invitation to Computer Science, 5th Edition

Figure 10.4 HTML Code for a Web Page Invitation to Computer Science, 5th Edition

Figure 10.5 Body of the Web Page Generated by Figure 10.4 Invitation to Computer Science, 5th Edition

Figure 10.6 Some HTML Tags Invitation to Computer Science, 5th Edition

JavaScript Scripting language HTTP POST message “Lightweight” language that is interpreted HTTP POST message Indicates that data is to be passed to the server JavaScript function ValidateName() Placed within <script></script> tags to alert the browser that these statements are to be interpreted as JavaScript commands Invitation to Computer Science, 5th Edition

Figure 10.7 An Example of the HTML <form> Tag Invitation to Computer Science, 5th Edition

Figure 10.8 JavaScript Embedded in an HTML Page Invitation to Computer Science, 5th Edition

Alternative Programming Paradigms Model or mental framework for representing or thinking about something Alternative paradigms for programming languages include viewing a program’s actions as: A combination of various transformations on items A series of logical deductions from known facts Multiple copies of the same subtask Invitation to Computer Science, 5th Edition

Functional Programming Functional programming language Views every task in terms of functions In a functional programming language: Primitive functions are defined as part of the language Functions Once defined, can be used in the definition of other functions Invitation to Computer Science, 5th Edition

Functional Programming (continued) list function Creates a list out of arguments car function Takes a nonempty list as its argument and produces as a result the first element in that list cdr function Takes a nonempty list as its argument and produces as a result the list that remains after the first element has been removed Invitation to Computer Science, 5th Edition

Functional Programming (continued) null? Has a single list as its argument Evaluates to true if the list is nil (empty) and to false if the list is nonempty Recursive Something that is defined in terms of “smaller versions” of itself Side effect Occurs when a function changes other values that it has no business changing Invitation to Computer Science, 5th Edition

Figure 10.9 Scheme Program to Add Nonnegative Integers Invitation to Computer Science, 5th Edition

Logic Programming In logic programming: Logic programming Fact Various facts are asserted to be true, and on the basis of these facts, a logic program can infer or deduce other facts Logic programming Has been used to write expert systems Fact Expresses a property about a single object or a relationship among several objects Invitation to Computer Science, 5th Edition

Logic Programming (continued) Prolog rule Declaration of an “if A then B” form, which means that if A is true (A is a fact), then B is also true (B is a fact) Inference engine Piece of software that is supplied as part of the language itself Invitation to Computer Science, 5th Edition

Figure 10.10 A Prolog Program Invitation to Computer Science, 5th Edition

Figure 10.11 The Logic Programming Paradigm Invitation to Computer Science, 5th Edition

Parallel Programming Parallel processing SIMD MIMD Catchall term for a variety of approaches to computing architectures and algorithm design SIMD Single control unit broadcasts a single program instruction to multiple ALUs MIMD Interconnected processors independently execute their own program on their own data Invitation to Computer Science, 5th Edition

Figure 10.12 “Grand Challenge” Computing Problems Invitation to Computer Science, 5th Edition

Figure 10.13(a) Model of SIMD Processing Invitation to Computer Science, 5th Edition

Figure 10.13(b) Model of MIMD Processing Invitation to Computer Science, 5th Edition

Parallel Programming (continued) Message passing primitives SEND/RECEIVE commands used to exchange information Divide-and-conquer model Problem is successively partitioned into smaller and smaller parts and sent off to other processors until each one has only a trivial job to perform Invitation to Computer Science, 5th Edition

Figure 10.14 A Divide-and-Conquer Approach Using Multiple Processors Invitation to Computer Science, 5th Edition

Summary Each programming language was designed to meet specific needs Procedural programming language: FORTRAN Object-oriented languages: Ada, Java, C++, C# Special-purpose languages: SQL, HTML, JavaScript A functional programming language views every task in terms of functions Invitation to Computer Science, 5th Edition

Summary (continued) Logic programming: various facts are asserted to be true, based on whether the program infers or deduces other facts Parallel programming SIMD (single instruction stream/multiple data stream) MIMD (multiple instruction stream/multiple data stream) Invitation to Computer Science, 5th Edition