C OMP 110 – I NTRODUCTION TO P ROGRAMMING Instructor: Jason Carter.

Slides:



Advertisements
Similar presentations
compilers and interpreters
Advertisements

Introduction to Programming Lecture 2. Today’s Lecture Software Categories Software Categories System Software System Software Application Software Application.
The Functions and Purposes of Translators Code Generation (Intermediate Code, Optimisation, Final Code), Linkers & Loaders.
Compiler Construction by Muhammad Bilal Zafar (AP)
CSCE 145: Algorithmic Design I Chapter 1 Intro to Computers and Java Muhammad Nazmus Sakib.
C OMP 401 I NTRODUCTION Instructor: Prasun Dewan.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Program Flow Charting How to tackle the beginning stage a program design.
Program Flow Charting How to tackle the beginning stage a program design.
Chapter 1 Introduction to C Programming. 1.1 INTRODUCTION This book is about problem solving with the use of computers and the C programming language.
Comp 14 Introduction to Programming Instructor: Prasun Dewan (Pr  sün Divän)
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
1 Chapter Two Introduction to the Programming Language C.
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
Chapter 1: Introduction To Computer | SCP1103 Programming Technique C | Jumail, FSKSM, UTM, 2005 | Last Updated: July 2005 Slide 1 Introduction To Computers.
Activity 1 - WBs 5 mins Go online and spend a moment trying to find out the difference between: HIGH LEVEL programming languages and LOW LEVEL programming.
Programming In C++ Spring Semester 2013 Programming In C++, Lecture 1.
CCSA 221 Programming in C CHAPTER 2 SOME FUNDAMENTALS 1 ALHANOUF ALAMR.
CSC 110 A 1 CSC 110 Introduction to Python [Reading: chapter 1]
CS 355 – Programming Languages
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
C OMP 110 – I NTRODUCTION TO P ROGRAMMING Instructor: Prasun Dewan.
Chapter 1.4 Programming languages Homework Due: Monday, August 11, 2014.
1 Computing Software. Programming Style Programs that are not documented internally, while they may do what is requested, can be difficult to understand.
What is a Computer? An, electrical machine, that can be programmed to accept data (input), process it into useful information (output) and store it away.
Lesson 6. GCSE Computing – programming languages Candidates should be able to:  describe common tools and facilities available in an integrated development.
Chapter 1 Introduction. Goal to learn about computers and programming to compile and run your first Java program to recognize compile-time and run-time.
C++ Programming Language Lecture 1 Introduction By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
INLS 560 – P ROGRAMMING FOR I NFORMATION P ROFESSIONALS Instructor: Jason Carter.
Python From the book “Think Python”
Introduction to Programming Lecture No. 1. Books  Deitel & Deitel :– C++ How to Program  Kernighan and Ritchie:- The C Programming Language.
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
Mrs. Ulshafer August, 2013 Java Programming Chapter 1.
P ROGRAMMING L OGIC AND D ESIGN S IXTH E DITION Chapter 1 An Overview of Computers and Programming.
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
What am I?. Translators Translators – Module Knowledge Areas Types of translators and their use Lexical analysis Syntax analysis Code generation and.
J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program Design, Second Edition Second Edition D.S. Malik D.S. Malik.
Intermediate 2 Computing Unit 2 - Software Development Topic 2 - Software Development Languages and Environments.
CS-303 Introduction to Programming
Programming Fundamentals Lecture No. 2. Course Objectives Objectives of this course are three fold 1. To appreciate the need for a programming language.
 Programming - the process of creating computer programs.
1 Overview of Programming Principles of Computers.
1 Asstt. Prof Navjot Kaur Computer Dept PRESENTED BY.
1 Types of Programming Language (1) Three types of programming languages 1.Machine languages Strings of numbers giving machine specific instructions Example:
Sung-Dong Kim Dept. of Computer Engineering, Hansung University Chapter 3 Programming Tools.
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
THE SOFTWARE Computers need clear-cut instructions to tell them what to do, how to do, and when to do. A set of instructions to carry out these functions.
How does a computer works Hyoungshick Kim Department of Computer Science and Engineering College of Information and Communication Engineering Sungkyunkwan.
Computer Systems Nat 5 Computing Science
The Art of Programming --
PRINCIPLES OF COMPILER DESIGN
Introduction to Compiler Construction
Component 1.6.
Chapter 5- Assembling , Linking, and Executing Programs
Language Translation Compilation vs. interpretation.
CSCI-235 Micro-Computer Applications
Computer Systems Nat 5 Computing Science
Java programming lecture one
Data Representation – Instructions
Unit# 8: Introduction to Computer Programming
TRANSLATORS AND IDEs Key Revision Points.
and Executing Programs
Compiler Construction
Unit 1: Introduction Lesson 1: PArts of a java program
CMP 131 Introduction to Computer Programming
PROGRAM AT RUNTIME Subject code: CSCI-620
Presentation transcript:

C OMP 110 – I NTRODUCTION TO P ROGRAMMING Instructor: Jason Carter

C OMPUTER W ORLD HardwareMemory Operating SystemMemory Page ProgramMemory Word ProcessorMemory Address Instruction (e.g. add 2 to 5)Running a Program Source CodeInteractive Program Object CodeNon-interactive (Batch) Program Programming LanguageProgram arguments Machine LanguageRuntime ProgrammersEditor Library (of Code)Editing Programs Translator (Compilers/Interpreter)Lexical Error UsersSyntax Error DisksSemantics Error Logic Error Debugging Style Principles

T HEATER A NALOGY Play Concert Talk Speech Cooking Lessons Town Hall Meeting

T HEATER W ORLD – P ART 1 Performer Theater Performer Stage Audience Performs RealTrial Performance Script Follows Performance Language Written in Notebook or Teleprompter Stored in Archive Fetched from Stagehand Assists Management Manages

T HEATER W ORLD – P ART 2 Performance Script Performance Language Written in Original Script Script Language Written in Translator Translator (Interpreter) Writes entire script Reads entire script Speaks sentence Hears sentence

T HEATER W ORLD – P ART 3 Original Script Script Language Written in Script Writer Written by Typewriter, Text Editor Uses Secretary Reference Material Links Syntax, Semantics, Logic, & Style Problems Checked by Word Processor, Script Writer Translator / Interpreter, Stagehand, Performer Word Processor, Script Writer Translator / Interpreter, Stagehand, Performer

C OMPUTER W ORLD – P ART 1 Processor Computer Users Interacts with RealDebugging Object Code Follows Machine Language Written in Memory Stored in Disk, Tape Fetched from Runtime Assists Operating System Manages

C OMPUTER W ORLD – P ART 2 Object Code Machine Language Written in Source Code Programming Language Written in Compiler Interpreter Writes entire source code Reads source code Writes statement Reads statement

Processor Compiler Interpreter Source Code Platform Independent Intermediate Code Platform Specific Machine Code T RANSLATING U SING B OTH A C OMPLIER AND A N I NTERPRETER

T HEATER W ORLD – P ART 3 Source Code Programming Language Written in Programmer Written by Typewriter, Text Editor Uses Linker Libraries Links Syntax, Semantics, Logic, & Style Problems Checked by Editor, Programmer, Translator, Operating System Runtime, Processor Editor, Programmer, Translator, Operating System Runtime, Processor

C OMPUTER VS. T HEATER ComputerTheater HardwareTheater Operating SystemTheater Management ProgramPerformance ProcessorPerformer Instruction (e.g. add 2 to 5)Performance action (e.g. walk 3 steps.) Source CodeOriginal Script Object CodePerformance Script Programming LanguageScript Language (e.g. German) Machine LanguagePerformance Language (e.g. English) ProgrammersScript Writers Library (of Code)Reference Material (from Books) Translator (Compilers/Interpreter)Translator (Before/During Performance) UsersAudience DisksArchival Storage Areas MemoryScript performance notebook accessible to performers HardwareTheater

C OMPUTER VS. T HEATER ComputerTheater Memory PageA Notebook Page Memory WordA Notebook Line Memory Address (Page Number, Word Number) Line Identification (Page Number, Line Number) Running a ProgramPerforming a Script Interactive ProgramPerformance with audience participation Non-interactive (Batch) ProgramPerformance with no audience participation Program argumentsSpecial instructions at start of performance RuntimeStage-Hands EditorTypewriter/Wordprocessor Editing ProgramsWriting Scripts Lexical ErrorSpelling Error Syntax ErrorGrammar Error Semantics ErrorInconsistencies in Script Logic ErrorExecution Error DebuggingStaging trial performances Style Principles

C OMPUTER VS. T HEATER CPU is fast: can do several performances at one time. CPU is dumb: no improvisation possible. Machine language much lower-level than programming language.

W HY J AVA Modern, modular (object-oriented) language. Good Error Detection. Rich Library Embodying Many Good Programming Principles Can Write Teaching Tool (ObjectEditor)

J AVA V ERSIONS, D IALECTS & P ROGRAMMING E NVIRONMENT JDK 1.5+ Eclipse IDE Programming Environment