McGraw-Hill The McGraw-Hill Companies, Inc., 20 1. 01 0

Similar documents
Chapter 13: Program Development and Programming Languages

Chapter 13: Program Development and Programming Languages

Chapter 13 Computer Programs and Programming Languages. Discovering Computers Your Interactive Guide to the Digital World

Chapter 14. Programming and Languages. McGraw-Hill/Irwin. Copyright 2008 by The McGraw-Hill Companies, Inc. All rights reserved.

How To Understand Programming Languages And Programming Languages

Chapter 12 Programming Concepts and Languages

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Chapter 1. Dr. Chris Irwin Davis Phone: (972) Office: ECSS CS-4337 Organization of Programming Languages

Programming Languages The McGraw-Hill Companies, Inc. All rights reserved.

CSCI 3136 Principles of Programming Languages

High-Level Programming Languages. Nell Dale & John Lewis (adaptation by Michael Goldwasser)

Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming

ATSBA: Advanced Technologies Supporting Business Areas. Programming with Java. 1 Overview and Introduction

Lecture 1: Introduction

Programming Languages

Programming Languages & Tools

Instructor Özgür ZEYDAN BEU Dept. of Enve. Eng. CIV 112 Computer Programming Lecture Notes (1)

Chapter 6: Programming Languages

EKT150 Introduction to Computer Programming. Wk1-Introduction to Computer and Computer Program

Evolution of the Major Programming Languages

White Paper: 5GL RAD Development

CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages. Nicki Dell Spring 2014

BEST WEB PROGRAMMING LANGUAGES TO LEARN ON YOUR OWN TIME

Scientific Programming, Analysis, and Visualization with Python. Mteor 227 Fall 2015

3 SOFTWARE AND PROGRAMMING LANGUAGES

Programming Languages

Welcome to Introduction to Computers and Programming Course using Python

CSC Software II: Principles of Programming Languages

CSE 307: Principles of Programming Languages

Discovering Computers Fundamentals, 2010 Edition. Living in a Digital World

Chapter 3.2 C++, Java, and Scripting Languages. The major programming languages used in game development.

What is a programming language?

Algorithm & Flowchart & Pseudo code. Staff Incharge: S.Sasirekha

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages

Introduction to Python

1/20/2016 INTRODUCTION

CHAPTER 1 ENGINEERING PROBLEM SOLVING. Copyright 2013 Pearson Education, Inc.

Java (12 Weeks) Introduction to Java Programming Language

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)

NATIONAL CERTIFICATES (VOCATIONAL)

CE 504 Computational Hydrology Computational Environments and Tools Fritz R. Fiedler

Fall 2012 Q530. Programming for Cognitive Science

A Comparison of Programming Languages for Graphical User Interface Programming

1. Overview of the Java Language

ARIZONA CTE CAREER PREPARATION STANDARDS & MEASUREMENT CRITERIA SOFTWARE DEVELOPMENT,

CS 106 Introduction to Computer Science I

Fundamentals of Programming and Software Development Lesson Objectives

Software: Systems and Application Software

ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Manage Software Development in LabVIEW with Professional Tools

Announcements FORTRAN ALGOL COBOL. Simula & Smalltalk. Programming Languages

Module 1. Introduction to Software Engineering. Version 2 CSE IIT, Kharagpur

Asogwa Tochukwu Chijindu Department of Computer Engineering, Enugu State University of Science and Technology(ESUT), Enugu, Nigeria.

Semester Review. CSC 301, Fall 2015

Embedded SQL. Unit 5.1. Dr Gordon Russell, Napier University

CS 40 Computing for the Web

Levels of Programming Languages. Gerald Penn CSC 324

Aspect-Oriented Programming

Ch. 10 Software Development. (Computer Programming)

Java CPD (I) Frans Coenen Department of Computer Science

OKLAHOMA SUBJECT AREA TESTS (OSAT )

CSE 130 Programming Language Principles & Paradigms

CS 51 Intro to CS. Art Lee. September 2, 2014

Computer Information Systems (CIS)

Software: Systems and. Application Software. Software and Hardware. Types of Software. Software can represent 75% or more of the total cost of an IS.

Software. Programming Language. Software. Instructor Özgür ZEYDAN. Bülent Ecevit University Department of Environmental Engineering

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1

Chapter 1 System Development Environment

Practical Programming, 2nd Edition

MICHIGAN TEST FOR TEACHER CERTIFICATION (MTTC) TEST OBJECTIVES FIELD 050: COMPUTER SCIENCE

50 Computer Science MI-SG-FLD050-02

Structure of Presentation. The Role of Programming in Informatics Curricula. Concepts of Informatics 2. Concepts of Informatics 1

Fundamentals of Java Programming

10/4/2013. Sharif University of Technology. Session # 3. Contents. Systems Analysis and Design

1.1 WHAT IS A PROGRAMMING LANGUAGE?

Computer Layers. Hardware BOOT. Operating System. Applications

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

Computational Mathematics with Python

CACHÉ: FLEXIBLE, HIGH-PERFORMANCE PERSISTENCE FOR JAVA APPLICATIONS

Java Programming (10155)

Recovering Business Rules from Legacy Source Code for System Modernization

ABET General Outcomes. Student Learning Outcomes for BS in Computing

The C Programming Language course syllabus associate level

Course MS10975A Introduction to Programming. Length: 5 Days

DEGREE PLAN INSTRUCTIONS FOR COMPUTER ENGINEERING

Computational Mathematics with Python

The Application of Visual Basic Computer Programming Language to Simulate Numerical Iterations

Keep it Simple... 7 Transformation-based Development (2013 and Beyond)...7 Less Customization and More Innovation...8 Time to Market...

On the (un)suitability of Java to be the first programming language

Functional Programming

1 File Processing Systems

Software Development and Object-Oriented Programming Paradigms

Computers. An Introduction to Programming with Python. Programming Languages. Programs and Programming. CCHSG Visit June Dr.-Ing.

Database Programming with PL/SQL: Learning Objectives

Programming Language Inter-conversion

Transcription:

1.1 McGraw-Hill The McGraw-Hill Companies, Inc., 2000

Objectives: To describe the evolution of programming languages from machine language to high-level languages. To understand how a program in a high-level language is translated into machine language using an interpreter or a compiler. To distinguish between four computer language paradigms. To understand the procedural paradigm and the interaction between a program unit and data items in the paradigm. 1.2

Objectives (continued): To understand the object-oriented paradigm and the interaction between a program unit and objects in this paradigm. To define functional paradigm and understand its applications. To define a declaration paradigm and understand its applications. To define common concepts in procedural and object-oriented languages. 1.3

9.1 EVOLUTION To write a program for a computer, we must use a computer language. A computer language is a set of predefined words that are combined into a program according to predefined rules (syntax). Over the years, computer languages have evolved from machine language to assembly languages to high-level languages. 1.4

Programming language: A set of rules, words, symbols, and codes used to write computer programs To write a program, you need appropriate software for the programming language you will be using Categories of programming languages Low-level languages: Difficult to code in; machine dependent Machine language: 1s and 0s Assembly language: Includes some names and other symbols to replace some of the 1s and 0s in machine language 5

6

High-level languages: Closer to natural languages Machine independent Includes 3GLs (FORTRAN, BASIC, COBOL,C, etc.) and object-oriented languages (Visual Basic, C#, Python, Java, etc.) Visual or graphical languages: Use graphical interface to create programs Fourth-generation languages (4GLs): Even closer to natural languages and easier to work with than highlevel Declarative rather than procedural Includes structured query language (SQL) used with databases 7

Table 9.1: Code in machine language to add two integers 1.8

Table 9.2: Code in assembly language to add two integers 1.9

Code in High Level Languages #include <stdio.h> int main( ) { int num1, num2, sum; printf("enter two integers: "); scanf("%d %d",&num1,&num2); sum=num1+num2; printf("sum: %d",sum); return 0; } 1.10

11 FORTRAN: High-level programming language used for mathematical, scientific, and engineering applications Efficient for math, engineering and scientific applications Still used today for high-performance computing tasks (weather forecast)

COBOL: Designed for business transaction processing Makes extensive use of modules and submodules Being phased out in many organizations Evolving (COBOL.NET) 12

13 Pascal: Created as a teaching tool to encourage structured programming Contains a variety of control structures used to manipulate modules systematically

BASIC: Easy-to-learn, high-level programming language that was developed to be used by beginning programmers Visual Basic: Object-oriented version of BASIC; uses a visual environment 14

C: Designed for system programming C++: Object-oriented versions of C C#: Used for Web applications Objective-C: For iphone and other Apple applications 15

Java: High-level, object-oriented programming language frequently used for Web-based applications Java programs are compiled into bytecode Can run on any computer that includes Java Virtual Machine (Java VM) Can be used to write Java applets Scroll text on Web page, games, calculators, etc Is one of the most popular programming languages today 16

17

Python: Open-source, dynamic, object-oriented language that can be used to develop a variety of applications Gaming, scientific, database, and Web applications Only recently gaining a following 18

Ruby: Open-source, object-oriented language that can be used to create general-purpose or Web applications Uses a syntax that is fairly easy to read and write, allowing programmers to create database-driven Web applications easily and quickly 19

9.2 TRANSLATION Programs today are normally written in one of the highlevel languages. To run the program on a computer, the program needs to be translated into the machine language of the computer on which it will run. The program in a high-level language is called the source program. The translated program in machine language is called the object program. 1.20

Types of language translators: Compilers: Language translator that converts an entire program into machine language before executing it Interpreters: Translates one line of code at one time Assemblers: Convert assembly language programs into machine language 21

1.22

9.3 PROGRAMMING PARADIGMS Today computer languages are categorized according to the approach they use to solve a problem. A paradigm, therefore, is a way in which a computer language looks at the problem to be solved. We divide computer languages into four paradigms: procedural (imperative), object-oriented, functional, and declarative. 1.23

1.24

Procedural programming: An approach to program design in which a program is separated into small modules that are called by the main program or another module when needed Uses procedures (modules, subprograms): Smaller sections of code that perform specific tasks Allows each procedure to be performed as many times as needed; multiple copies of code not needed Prior to procedural programming, programs were one large set of instructions (used GOTO statements) Structured programming: Goes even further, breaking the program into small modules (Top-down design) that use basic structures 25

1.26

1.27

Object-oriented programming (OOP): Programs consist of a collection of objects that contain data and methods to be used with that data Class: Group of objects that share some common properties Instance: An individual object in a class Attributes: Data about the state of an object Methods: Perform actions on an object Objects can perform nontraditional actions and be easily used by more than one program Inheritance between classes improve reuse 28

1.29

1.30

31 Aspect-oriented programming (AOP): Separates functions so program components can be developed and modified individually from one another The components can be easily reused with separate nonrelated objects Adaptive software development: Designed to make program development faster and more efficient and focus on adapting the program as it is being written Iterative and/or incremental Includes RAD (rapid application development) and extreme programming (XP) Agile software development: Focuses on building small functional program pieces during the project

1.32

1.33

9.4 COMMON CONCEPTS In this section we conduct a quick navigation through some procedural languages to find common concepts. Some of these concepts are also available in most object-oriented languages because, as we explain, an object-oriented paradigm uses the procedural paradigm when creating methods. 1.34

Identifiers Data Types Variables Constants Input and Output Expressions Statements 1.35

Table 9.3: Arithmetic operators 1.36

Table 9.4: Relational operators 1.37

Table 9.5: Logical operators 1.38

1.39

1.40

1.41