Ch. 1 - Lecture 2 - Program Development
Ch. 1 - Lecture 2 - Program Development
machine
For Windows Users:
Download/Install:
Go to
http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u31-
download-1501634.html
Accept License Agreement and then download the file named “jdk-6u31-
windows-i586.exe”.
Save the file to the desktop and run it.
Once the installer is finished, you must set your computer's path before
Java will work correctly.
Installing Java on a Home
machine (cont’d)
Setting the Path:
Go to the Control Panel and double-click System
Select the Advanced tab
Click on the Environment Variables button
Look under System Variables for "Path"
Click on "Path" and then click edit
Add the following to the end of the Path
; C:\Program Files\Java\jdk1.6.0_31\bin
Click OK.
Click the "New" button.
For the variable name, type: CLASSPATH
For the value, type: .;
NOTE: The above value in words is period semicolon; it is not a misprint.
Click OK.
Exit out of all the open windows
Installing Java on a Home
machine (cont’d)
To test if java is installed correctly:
Software
Programs and the data those programs use
Input/output devices
allow human beings to interact with a computer
Memory
stores programs and data while being processed by CPU
Computer hardware (cont’d)
Memory
CPU
What is programming
Computers performs tasks
more efficiently, quickly, and accurately
Computer programming:
Devise a set of instructions
to be executed by a computer
Problem-Solving Implementation
Phase Phase
Analysis and
specification Concrete
solution
General (Program)
solution
(Algorithm) Test
Verify
Maintenance
Phase
Algorithm implementation
Problem Solving
Phase
Problem (Algorithm)
Shortcut?
Implementation
Phase
(code)
In a computer,
data represented by pulses of electricity
On circuit => ‘1’; Off circuit => ‘0’
Assembly language
Short English like words for commands and data
Tedious to use
Drawback:
Programs run more slowly,
JAVA
Source code
JAVA
JAVA compiler bytecode
JAVA Bytecode
interpreter compiler
Machine
code