Comp 14 Introduction to Programming. Instructor: Prasun Dewan. (Pr sün Divän). Computer World. Theater Analogy. Play Concert Talk Speech Cooking Lessons Town Hall Meeting. Performance Script. Performance Language. written in. Theater Management. follows. stored in. managing.
Comp 14Introduction to Programming Instructor: Prasun Dewan (Prsün Divän)
Theater Analogy • Play • Concert • Talk • Speech • Cooking Lessons • Town Hall Meeting
Performance Script Performance Language written in Theater Management follows stored in managing Theater Performer Notebook / Teleprompter Performer fetched from performs assists Real Trial Archive Stagehand Audience 1.1(a) The Theater World
Original Script Script language written in Translator Translator (Interpreter) Performance Script Performance Language written in 1.1(b) The Theater World reads entire script hears sentence speaks sentence writes entire script
Word Processor / Typewriter Word Processor, Script Writer Translator / Interpreter, Stagehand, Performer uses checked by Reference Material Script Writer Syntax, Semantics, Logic, & Style links Secretary written by problems 1.1 (a) The Theater World Original Script
Operating System 1.2(a) The Computer World Object Code Machine Language written in stored in managing follows Processor Memory fetched from interacts with assists Debugging Runtime Real Disk / Tape User
1.2 (b) The Computer World Source Code Programming Language written in reads entire code reads statement Compiler Interpreter writes statement writes entire code Object Code Machine Language written in
1.3 Translating using both a Compiler and Interpreter Source Code Compiler Platform-Independent Intermediate Code Interpreter Platform-Specific Machine Code CPU
Program Editor 1.2 (a) The Computer World J++ Editor, Programmer, Translator, Operating System Runtime, Processor checked by uses Libraries Syntax, Semantics, Logic, & Style Programmer links Linker written by problems Programming Language written in Source Code
Computer Vs Theater • CPU is fast: can do several performances at one time. • CPU is dumb: no improvisation possible. • Machine language much lower-level than programming language.
Why Java • Modern, modular (object-oriented) language. • Good Error Detection. • Rich Library Embodying Many Good Programming Principles • Can Write Teaching Tool (ObjectEditor)
Java Versions, Dialects & Programming Enviromnet • JDK 1.1 • Microsoft Implementation • Swing 1.1 • Visual J++ Programming Environment • Will not matter