Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "C OMP 110 – I NTRODUCTION TO P ROGRAMMING Instructor: Jason Carter."— Presentation transcript:

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

2 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

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

4 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

5 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

6 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

7 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

8 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

9 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

10 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

11 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

12 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

13 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.

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

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


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

Similar presentations


Ads by Google