Introduction to Programming

Similar documents
Chapter 1 Overview of Programming and Problem Solving By C.K. Liang

Structured Languages. Rahul Deodhar

Introduction to Computers, the Internet and the Web Pearson Education, Inc. All rights reserved.

0 Introduction: Computer systems and program development

Chapter 1 Introduction to Computers and C++ Programming

Chapter 1: Introduction

1/14/2014. Introduction to CSE 1325 Object Oriented Programming (Using Java) Introduction (Cont.) Introduction

Introduction to Computers and Visual Basic.Net Pearson Education, Inc. All rights reserved.

Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

Lecture 1: Preliminaries

C++ Programming Language Lecture 1 Introduction

Chapter 1: An Overview of Computers and Programming Languages. Objectives. Objectives (cont d.) Introduction

Fundamentals of Programming Session 2

Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008.

Chapter 1. Preview. Reason for Studying OPL. Language Evaluation Criteria. Programming Domains

by Pearson Education, Inc. All Rights Reserved.

C++ Spring Break Packet 11 The Java Programming Language

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING

CSCI170 Lecture 1: Analysis of Programming Languages. John Magee 1 September 2011 Some material copyright Jones and Bartlett

Chapter 1. Preliminaries

Fundamentals of Programming. Lecture 1: Introduction to C Programming

What is a programming language?

PROGRAMMAZIONE I A.A. 2017/2018

Chapter 1 Preliminaries

Introduction to Java. Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved.

Comp 333: Concepts of Programming Languages Fall 2016

Chapter 1 Introduction to Computers and C++ Programming

What is programming? What are computer languages and how have they evolved? What is the basic process of programming, including the tools involved?

Unit. Programming Fundamentals. School of Science and Technology INTRODUCTION

Introduction. A. Bellaachia Page: 1

INFS 214: Introduction to Computing

Programming Languages and Program Development

CS 113: Introduction to

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

Getting Started. Chapter 1. Java Programming FROM THE BEGINNING. Chapter 1: Getting Started

Chapter 1. Preliminaries

Discovering Computers 2008

PLAGIARISM. Administrivia. Course home page: Introduction to Programming Languages and Compilers

Introduction to Programming Languages and Compilers. CS164 11:00-12:00 MWF 306 Soda

LANGUAGE TRANSLATORS. Workbook. etghallem. St. Aloysius College Computing

Introduction to Computers, the Internet and the World Wide Web

CSc 10200! Introduction to Computing. Lecture 1 Edgardo Molina Fall 2013 City College of New York

CS120 Computer Science I. Instructor: Jia Song

Object Oriented Concepts and Programming (CSC244) By Dr. Tabbasum Naz

CGT 456 Lecture 1. Introduction to Computers & Programming

Low-Level Languages. Computer Programs and Programming Languages

Principles of Programming Languages. Lecture Outline

Module 1: Introduction to Computers, Programs, and Java

Why study Programming Language Concepts? Chapter One. Language Evaluation Criteria. Programming Domains. Readability Writability Reliability Cost

CISC 124: Introduction To Computing Science II

Topic I. Introduction and motivation References: Chapter 1 of Concepts in programming languages by J. C. Mitchell. CUP, 2003.

Design & Implementation Overview

Chapter 1 Introduction to Computers, Programs, and Java. What is a Computer? A Bit of History

Outline. Programming Languages 1/16/18 PROGRAMMING LANGUAGE FOUNDATIONS AND HISTORY. Current

Internet and Visual Basic Pearson Education, Inc. All rights reserved.

Introduction to C++ Programming. Adhi Harmoko S, M.Komp

Programming Languages and Program Development Life Cycle Fall Introduction to Information and Communication Technologies CSD 102

Introduction to JAVA Programming Language

Introduction to Programming

INTRODUCTION TO THE COURSE

8/27/17. CS-3304 Introduction. What will you learn? Semester Outline. Websites INTRODUCTION TO PROGRAMMING LANGUAGES

From High Level to Machine Code. Compilation Overview. Computer Programs

8/23/18. Programming Language Genealogy The Evolution of Programming Languages. Zuse s Plankalkül. Plankalkül Syntax. Machine Code

COSC 2P90 Programming Languages & Object-Orientation

Chapter 1 Introduction to Computers, Programs, and Java

INFORMATICS WITH DTP

Chapter 14 Operating Systems

Lecture 2. A Historical View

Appendix to Topic IV

Programming Languages FILS Andrei Vasilateanu

Fundamentals of Programming (C)

Why do we have to know all that? The stored program concept (the procedural paradigm) Memory

Objective: To learn meaning and concepts of programming. Outcome: By the end of this students should be able to describe the meaning of programming

Administration Computers Software Algorithms Programming Languages

IS 0020 Program Design and Software Tools

Spring 2018 NENG 202 Introduction to Computer Programming

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University

Visual Basic Primer A. A. Cousins

General Concepts. Abstraction Computational Paradigms Implementation Application Domains Influence on Success Influences on Design

Chapter 1: Introduction to Computers, Programs, and Java

Programming Languages, Summary CSC419; Odelia Schwartz

G51OOP. Object Oriented Programming Comp Sci University of Nottingham Unit 1 : Introduction

Introduction to OOP Using Java Pearson Education, Inc. All rights reserved.

Chapter 14 Operating Systems

Java Language. Programs. Computer programs, known as software, are instructions to the computer. You tell a computer what to do through programs.

CSI32 Object-Oriented Programming

Chapter 2. Evolution of the Major Programming Languages

BIL 104E Introduction to Scientific and Engineering Computing. Lecture 1

BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1

CS240: Programming in C

Lecture 1: Introduction to Java

Programming Languages 2nd edition Tucker and Noonan"

C LANGUAGE AND ITS DIFFERENT TYPES OF FUNCTIONS

Concepts in Programming Languages

COURSE OVERVIEW. Introduction to Computer Engineering 2015 Spring by Euiseong Seo

Chapter 1 Introduction to Computers, Programs, and Java

Chapter 11 Program Development and Programming Languages

Chapter 2. Pseudocodes: Speedcoding. 2.2 Minimal Hardware Programming: Pseudocodes. Evolution of the Major Programming Languages

Why are there so many programming languages? Why do we have programming languages? What is a language for? What makes a language successful?

Transcription:

Introduction to Programming session 3 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2010 These slides are created using Deitel s slides Sahrif University of Technology

Outlines Common Softwares (Cont'd) Programming Language History of C and C++ Other Programming Languages 2

Common Softwares Operating System Compilers Assemblers Interpreters 3

What does the computer understand? Computer only understands machine language instructions. 4

Assembler Instructions written in assembly language must be translated to machine language instructions : Assembler does this One to one translation : One AL instruction is mapped to one ML instruction. AL instructions are CPU specific. 5

Compiler Instructions written in high-level language also must be translated to machine language instructions : Compiler does this Generally one to many translation : One HL instruction is mapped to many ML instruction. HL instructions are not CPU specific but compiler is. 6

7 Translation from HLL to ML

Interpreter An interpreter translates high-level instructions into an intermediate form, which it then executes. In contrast, a compiler translates high-level instructions directly into machine language. Compiled programs generally run faster than interpreted programs. The advantage of an interpreter, however, is that it does not need to go through the compilation stage during which machine instructions are generated. This process can be time-consuming if the program is long. The interpreter, on the other hand, can immediately execute high-level programs. For this reason, interpreters are sometimes used during the development of a program, when a programmer wants to add small sections at a time and test them quickly. 8

Programming Language (2) A programming language is an artificial language designed to express computations that can be performed by a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine, to express algorithms precisely, or as a mode of human communication. Many programming languages have some form of written specification of their syntax (form) and semantics (meaning). Some languages are defined by a specification document. For example, the C programming language is specified by an ISO Standard. Other languages, such as Perl, have a dominant implementation that is used as a reference. 9

Programming Language (2) A programming language is a notation for writing programs, which are specifications of a computation or algorithm. Some, but not all, authors restrict the term "programming language" to those languages that can expressall possible algorithms. 10

History of C and C++ History of C Evolved from two other programming languages BCPL and B Typeless languages Dennis Ritchie (Bell Laboratories) Added data typing, other features Development language of UNIX Hardware independent Portable programs 1989: ANSI standard 1990: ANSI and ISO standard published ANSI/ISO 9899: 1990 11

History of C and C++ History of C++ Extension of C Early 1980s: Bjarne Stroustrup (Bell Laboratories) Provides capabilities for object-oriented programming Objects: reusable software components Model items in real world Object-oriented programs Easy to understand, correct and modify Hybrid language C-like style Object-oriented style Both 12

C++ Standard Library C++ programs Built from pieces called classes and functions C++ standard library Rich collections of existing classes and functions Building block approach to creating programs Software reuse 13

Java Java 1991: Sun Microsystems Green project 1995: Sun Microsystems Formally announced Java at trade show Web pages with dynamic and interactive content Develop large-scale enterprise applications Provide applications for consumer devices Cell phones, pagers, personal digital assistants, 14

Visual Basic, Visual C++ and C# BASIC Beginner s All-Purpose Symbolic Instruction Code Mid-1960s: Prof. John Kemeny and Thomas Kurtz (Dartmouth College) Visual Basic 1991 Result of Microsoft Windows graphical user interface (GUI) Developed late 1980s, early 1990s Powerful features GUI, event handling, access to Win32 API, object-oriented programming, error handling Visual Basic.NET 15

Visual Basic, Visual C++ and C# Visual C++ Microsoft s implementation of C++ Includes extensions Microsoft Foundation Classes (MFC) Common library GUI, graphics, networking, multithreading, Shared among Visual Basic, Visual C++, C#.NET platform Web-based applications Distributed to great variety of devices Cell phones, desktop computers 16

Visual Basic, Visual C++ and C# C# Anders Hejlsberg and Scott Wiltamuth (Microsoft) Designed specifically for.net platform Roots in C, C++ and Java Easy migration to.net Event-driven, fully object-oriented, visual programming language Integrated Development Environment (IDE) Create, run, test and debug C# programs Rapid Application Development (RAD) Language interoperability 17

Other High-level Languages FORTRAN FORmulaTRANslator 1954-1957: IBM Complex mathematical computations Scientific and engineering applications COBOL COmmon Business Oriented Language 1959: computer manufacturers, government and industrial computer users Precise and efficient manipulation of large amounts of data Commercial applications 18

Other High-level Languages Pascal Prof. NiklausWirth Academic use 19

Structured Programming Structured programming (1960s) Disciplined approach to writing programs Clear, easy to test and debug, and easy to modify Pascal 1971: NiklausWirth Ada 1970s - early 1980s: US Department of Defense (DoD) Multitasking Programmer can specify many activities to run in parallel 20

The Key Software Trend: Object Technology Objects Reusable software components that model real world items Meaningful software units Date objects, time objects, paycheck objects, invoice objects, audio objects, video objects, file objects, record objects, etc. More understandable, better organized and easier to maintain than procedural programming Favor modularity Software reuse Libraries o MFC (Microsoft Foundation Classes) 21