Title: Comp 14 Introduction to Programming
1Comp 14Introduction to Programming
Instructor Prasun Dewan
(Pr?sün Divän)
2Computer World
3Theater Analogy
- Play
- Concert
- Talk
- Speech
- Cooking Lessons
- Town Hall Meeting
41.1(a) The Theater World
51.1(b) The Theater World
reads entire script
hears sentence
speaks sentence
writes entire script
61.1 (a) The Theater World
Original Script
71.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
81.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
91.3 Translating using both a Compiler and
Interpreter
Source Code
Compiler
Platform-Independent Intermediate Code
Interpreter
Platform-Specific Machine Code
CPU
101.2 (a) The Computer World
Program Editor
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
11Computer Vs Theater
12Computer Vs Theater
13Computer 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.
14Why Java
- Modern, modular (object-oriented) language.
- Good Error Detection.
- Rich Library Embodying Many Good Programming
Principles - Can Write Teaching Tool (ObjectEditor)
15Java Versions, Dialects Programming Enviromnet
- JDK 1.1
- Microsoft Implementation
- Swing 1.1
- Visual J Programming Environment
- Will not matter